MATLAB: How transform matrix to vector matrix hello everyone, I have matrix with 6*36 elements I want to transform all the elements in vector with 108*1 (108=6*36) example A=[1 2 3;8 9 7] will be B=[1;2;3;8;9;7 ] and thank you very much Best Answer A = [1 2 3 ; 8 9 7] ; iwant = A(:) Related SolutionsMATLAB: How to sort matrix based on another matrix >> A = [3,2,1;8,3,1;6,4,2]A = 3 2 1 8 3 1 6 4 2>> B = [5,9,2;9,2,1;8,7,4]B = 5 9 2 9 2 1 8 7 4>> [A,X] = sort(A,2);>> for k = 1:size(X,2), B(k,:) = B(k,X(k,:)); end>> AA = 1 2 3 1 3 8 2 4 6>> BB = 2 9 5 1 2 9 4 7 8 MATLAB: QUESTION ON MATRIX RESHAPING a = reshape(1:9,3,[])';out = kron(a,ones(3));orout = repelem(A,3,3) Related QuestionHow to randomly moving rows of a matrixFourier transform
Best Answer