MATLAB: Finding minimum values in a matrix of array nx1

finding min values

how to find five to ten minimum values in a matrix of array nx1 i,e. 1st min , 2nd min and so on..

Best Answer

Use sort function
a=sort(A)
out=a(1:10)