Sorting

조회 수: 17 (최근 30일)
Edward
Edward 2012년 5월 26일
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일
Use the sortrows() function instead.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by