MATLAB: How to concatenate a row vertically every 5 cells arrayarray orderconcatenateMATLABmatrixrearrangereorder Hi all, if A is an array 1 x 100, how can I turn it into an array of 10×10 or 20 x 5? Thanks Best Answer You can use reshape command to do that.A=randi(20,1,100);reshape(A,20,5);reshape(A,20,5);It reshapes along the column of the matrix. This below example clarifies your concept:A = 1:10;B = reshape(A,[5,2])B = 1 6 2 7 3 8 4 9 5 10 Related SolutionsMATLAB: Matrix reshaping reshape(A',1,[]) MATLAB: Transposing 5x5x5 matrix new = permute(r,[2,1,3]) Related QuestionHow to make a 3×3 matrix a 9×1 matrixTransposing cellsReshaping a matrix dimensionVertically concatenate blocks of arrays
Best Answer