MATLAB: How to turn the columns and rows in a random matrix matrix turn We have a 4×3 matrix = [9 11 13; 10 12 14; 11 13 15; 12 14 16] and we want to turn the columns and rows around so that it will result in [16 14 12 15 13 11 14 12 10 13 11 9 Who knows how to do this? Best Answer result = flipud(fliplr(your_matrix));orresult = reshape(your_matrix(end:-1:1),size(your_matrix));orresult = your_matrix; result(:) = result(end:-1:1); Related SolutionsMATLAB: How to take a column of matrix and turn it into vector vector=matrix(:,5) MATLAB: Subtracting numbers from a date serial It takes three lines, not one, but you’re close:result = reshape(date_num, 2, []);result = [result; result(end,:)-1];result = result(:)result = 736274 736273 736272 736246 736245 736244 736211 736210 736209 736183 736182 736181 Related QuestionRepeat last row at the end of matrixHow to extract a part of a matrix with condition in MatlabHow to reduce rows to columnDouble a number within a matrix with a certain characteristicSelecting random number from martrixHow can i merge multi columns of a matrix in another matrix with single columnAdding a frame of zeros to a matrix
Best Answer