MATLAB: Reshape matrix (Special case)

digital image processingimage analysisimage processingmatlab codersignal processing

Have a matrix (360,1), I want to put every 3 elements in a row, the next 3 elements in the second row in new matrix and so on to be the new matrix (120,3).

Best Answer

A = rand(360,1) ;
iwant = reshape(A,3,[])';