NM-Lab 03
NM-Lab 03
Types of Arrays
Row vector:
Column vector:
➤ Multidimensional Arrays
Function Description
Array Operations
A = [1, 2; 3, 4];
B = [5, 6; 7, 8];
C = A .* B; % Element-wise multiplication
D = A .^ 2; % Element-wise power
Matrix multiplication:
Function Description
Row Vectors
Column Vectors
Creating a Vector with Constant Spacing by
Specifying First Term
In a vector with constant spacing the difference between the elements is same.
The eye command creates a square matrix with n rows and n columns in which the diagonal elements
are equal to 1 and rest of the elements are 0.
Build-in Array Functions
Array Creation Functions
Function Description
var(A) Variance
`& , , ~`