MATLAB: Matrix row and cloumn exchange MATLABmatrixmatrix manipulation a=[14 13 9 10 6 5 1 2] i m trying to convert it into b=[ 14 13 9 10 6 5 1 2] Best Answer Alina, use b = reshape(a',2,4)' Related SolutionsMATLAB: Convert a 1*16 matrix to a 2*8 matrix >> V = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16];>> reshape(V,[],2).'ans = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 MATLAB: How to flip every 5th row and column in matrix >> M = repmat((1:12).',1,3)M = 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 11 11 11 12 12 12>> M([4:6:end,6:6:end],:) = M([6:6:end,4:6:end],:)M = 1 1 1 2 2 2 3 3 3 6 6 6 5 5 5 4 4 4 7 7 7 8 8 8 9 9 9 12 12 12 11 11 11 10 10 10 Related QuestionRowsHow to exchange matrix rows depending on distanceChange column and rowRow Wise concatenation
Best Answer