MATLAB: Converting numbers to matrix(matrix formation) matrix formation If I am having some numbers, e.g x=[ 12 12 12 2 2 2 2 3 3 ]; and now I want to convert into a matrix of 3 * 3. Which MATLAB function is suitable for this? Best Answer Use the 'reshape' function. Related SolutionsMATLAB: Converting a 3d matrix into a 2d matrix B = reshape(A,11,250,3) ;Where A is your 11*3(250 matrix MATLAB: Matrix(Matrix) The "a" values are simply being used as row numbers for indexing into b.b(a(:),:)= b([1;2;1;2],:)which is equivalent to[ b(1,:); b(2,:); b(1,:); b(2,:)]= 1 0 1 0 Related QuestionUse Matrix(Matrix == x) = y; on cell arayAm I unable to use the RESHAPE function to convert a sparse vector to a three-dimensional matrix in MATLABHow to parallelize separate matrix-matrix multiplicationsChanging the Structure of a Matrix.Invers from covariance of a matrix*matrix’There is a 549x800x6 matrix, I want to convert it to 549x2400x2. Please help.
Best Answer