MATLAB: How to find second largest OR third largest Or any largest value among the columns of a matrix

maxsecond largest

I have a matrix A=rand(7,25)
I want to find the second largest/third largest/fourth/fifth and sixth largest value among all the columns of matrix "A". No need of seventh largest as there are total 7 values in each column.
Thank you.

Best Answer

A=rand(7,25)
[aa,indices]=sort(A,'descend')