Sunday, 8 September 2013

Split a matrix into smaller matrices

Split a matrix into smaller matrices

I have a matrix of size 20*20. I want to split it into two sub-matrices of
size 20*10. If i use the following code:
e
f=mat2cell(e,[10,10],[10,10])
celldisp(f)
i get four sub-matrices of size 10*10 and if i use the following code, i
get two matrices of size 10*20.
e
f=mat2cell(e,[10,10])
celldisp(f)
(where e is the matrix which i want to split)
How can i get two sub-matrices of size 20*10? Please help.

No comments:

Post a Comment