Hi, im having a problem sorting
I have a matrix with two columns, column one is the data i need sorting in numerical order, but the second column is frequency data so i dont want that sorted, but i need the frequencies to remain with the column one data..
Using sort(X) sorts both columns, how can i get around this?

 채택된 답변

Image Analyst
Image Analyst 2012년 5월 26일

0 개 추천

Use the sortrows() function instead.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

태그

질문:

2012년 5월 26일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by