I have a 2x100x10 matrix, "M", and I want to create two 2D matrices each 100×10 from them. When I try and do this with indexing, I get a 1x100x10 matrix that is still 3D, instead of the 100×10 2D matrix.
How do I get the desired matrices?
>> M = rand(2,100,10);>> m1 = M(1,:,:);>> m2 = M(2,:,:);>> size(m1)ans = 1 100 10
Best Answer