MATLAB: How to convert matrix size

changeconvertmatrixsize;

I have a matrix s which has the size : 2882×2575 then I convert it to 7421150×1 by this:
s1=s(:);
and I did some process… now I need to convert it back s1 to 2882×2575 how can I do this ?

Best Answer

reshape(s1,2882,2575)
or
reshape(s1,2575,2882).'
depending on the order you want.