Monday, July 17, 2006

[Matlab] reshape

OUT = reshape(IN, [m n p ...] );
For input matrix IN, the data to be taken is of the following order:

IN[1,1,1,...];
IN[2,1,1,...];
IN[3,1,1,...];
...
IN[1,2,1,...];
IN[2,2,1,...];
...

Similarly, the data to be assigned in output matrix OUT is of the following order:

OUT[1,1,1,...];
OUT[2,1,1,...];
OUT[3,1,1,...];
...
OUT[1,2,1,...];
OUT[2,2,1,...];
...

No comments: