MATLAB: How to convert the 1D matrix into 2D matrix 2d matrix I have 1D matrix.now I want to convert the 1D matrix into 2D matrix.can you give me the code to convert it? Best Answer By using reshape function:A=randi([1 6],1,10); %demo datareshape(A,2,[]) Related SolutionsMATLAB: How to reconstruct a original 2D image from the 1D matrix You need to reshape your 1D vector into mXn matrix. Have a look on reshape function. MATLAB: Converting 2D Array to 3D permute(reshape(A,I/3,[],J),[1,3,2]) % A - matrix, I - no of rows, J - no of columns Related QuestionHow to convert 1D binary data matrix to 2D image matrixReshape 3d to 2d array1D Matrix element shiftingConverting a 3d matrix into a 2d matrix
Best Answer