MATLAB: How can i sort all the rows of a matrix but one along a row

MATLAB and Simulink Student Suitematrix array

How would i sort a 15 x 5 matrix descending based on the 5th column without changing the first column.

Best Answer

b=[a(:,1),sortrows(a(:,2:end),4,'descend')];