MATLAB: How to make a 3×3 matrix a 9×1 matrix matrixmatrix manipulation Hey i have a matrix x=[ 1 4 7; 2 5 8 ;3 6 9]; how do I make this matrix become x=[ 1;2;3;4;5;6;7;8;9]; Best Answer reshape(x,9,1)or x(:) % this creates a column vector out of a matrix Related SolutionsMATLAB: Use 3×3 Matrix to create 9×15 Matrix. Well here is one way:% Define the 3 by 3 matrix.array3x3 = [1 2 3; 4, 5, 6; 7, 8, 9];% Create the top and middle bands.band1 = repmat([array3x3, zeros(3)], 1, 3)band2 = circshift(band1, 3, 2)% Stack them vertically.final9x15 = [band1(:, 1:15); band2(:, 1:15); band1(:, 1:15)] MATLAB: Do a matrix,array This works:B = reshape(A', 1, []); Related QuestionString into 3×3 MatrixConstructiong 3×3 matrix windowHow to multiply 7 x 1 matrix with 400 x 1 matrixChanging composition of Row Matrix (1×9) into a 3×3 MatrixHow to reshape a matrix to a vector
Best Answer