MATLAB: How to sort a column of data based on another

arrayascendingdataMATLABmatlab basicssorttable

Hi everyone, I have two columns of data. I wan to sort column A in theascending order and I want the corresponding values in column B be sorted as well according to A. How to do this in MATLAB?
Thanks!

Best Answer

As shared in your original post tonight, look at sortrows.