mat2cell Break matrix up into a cell array of matrices.
Synopsis
mat2cell(M,R,C);
Description
MAT2CELL(M,R,C) takes three arguments,
M   
ROWxCOL Matrix.
R   
Vector of row sizes (should sum to ROW).
C   
Vector of col sizes (should sum to COL). and returns a cell array of matrices, found using R and C. Example
M   
[1 2 3 4; 5 6 7 8; 9 10 11 12];
M   
[1 2 3 4; 5 6 7 8; 9 10 11 12];
C   
mat2cell(M,[1 2],[2 2]) See also cell2mat

See the matlab file mat2cell.m (may require other functions)

Back to functions