Sorting

11 visualizaciones (últimos 30 días)
Edward
Edward el 26 de Mayo de 2012
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?

Respuesta aceptada

Image Analyst
Image Analyst el 26 de Mayo de 2012
Use the sortrows() function instead.

Más respuestas (0)

Categorías

Más información sobre Shifting and Sorting Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by