home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-02-21 | 540 b | 19 lines | [TEXT/RLAB] |
- reshape:
-
- Syntax: reshape ( A , nrow, ncol )
-
- Description:
-
- Reshape does what it's name implies, it reshapes the input
- matrix so that the return value has the number of rows and
- columns specified by the last two arguments. Reshape will not
- reshape the matrix if the product of the new row and column
- dimensions does not equal the product of the existing row and
- column dimensions.
-
- Examples:
-
- m = [1,2,3;4,5,6;7,8,9];
- mrow = reshape(m, 1, 9); // converts m to a row matrix
- mcol = reshape(m, 9, 1); // converts m to a column matrix
-