|
"Faisal " <artistlikeu@yahoo.com> wrote in message <id8mp9$fgv$1@fred.mathworks.com>...
> I have a matrix (300 x 25)
>
> i want to divide it into 10 matrice such that
> a) each matrix has 30 rows
> b) each matrix has 25 columns
>
> i.e. number of columns are same always
> answer should be like
>
> M1 = 30 x 25 (rows start from 1 and end at 30)
> M2 = 30 x 25 (rows start from 31 and ends at 60)
> M3 = 30 x 25 (rows start from 61 and ends at 90)
> .
> .
> .
> how i can solve this problem?
A = your 300x25 matrix
X = mat2cell(A,30*ones(10,1),25);
X{1} is your M1, X{2} is your M2, etc.
James Tursa
|