I have a matrix containing 4320 entries
for example:
P=[ 26 29 31 33 35 26 29 ……….25]
I want to create 180 matrices and every matrix contains 24 entries,i.e
the 1st matrix contains the 1st 24 entries
the 2nd matrix contains the 2nd 24 entries and so on
I know a simple method but it will take a long time which is:
P1=P(1:24);P2=P(25:48),……….P180=P(4297:4320)
and it is dificult since I have huge number of entries for
the original matrix P
thanks
I’m going to go ahead and assume this is MATLAB-related, in which case you’d use the
reshapefunction:Pxwill now be a proper matrix, and you can access each of the 180 “matrices” (actually row vectors, you seem to be confusing the two) by simple MATLAB syntax: