mattoarray¶
Purpose¶
Converts a matrix to a type array.
Format¶
-
y =
mattoarray
(x)¶ - Parameters:
x (matrix) – data
- Returns:
y (1-or-2-dimensional array) – data converted to an array type.
Examples¶
// Set x to be a 2x3 matrix of fives
x = 5*ones(2, 3);
// Convert x to an array
// and save as y
y = mattoarray(x);
y will be a 2x3 array of fives.
Remarks¶
If the argument x is a scalar, mattoarray()
will simply return the scalar,
without changing it to a type array.
See also
Functions arraytomat()