Sort twice within the same dataset

2 visualizaciones (últimos 30 días)
BA
BA el 4 de Jul. de 2022
Comentada: BA el 4 de Jul. de 2022
I'm working with a really large data set and I was hoping to write some code to sort within the same data set twice. This might sound confusing but specifically what I'm trying to do is sort one column, and while keeping the sort for that row, I want to sort another column.
If anyone is aware of a way to do this, please let me know.
Thanks

Respuesta aceptada

dpb
dpb el 4 de Jul. de 2022
Well, it's certainly not totally clear what you mean -- but if you mean sort by multiple columns, see sortrows, the optional second argument, column
  12 comentarios
Bruno Luong
Bruno Luong el 4 de Jul. de 2022
Editada: Bruno Luong el 4 de Jul. de 2022
"If you can make something of it though, let me know"
No it's your data, no one can do "'something of it"
So you discover that your importation reverses date and month and has missing date in the data base. It has nothing with the original question you asked about sorting.
It seems you can accept dpb answer and move on, and ask another question if you are stuck by other issues.
BA
BA el 4 de Jul. de 2022
Well he asked for the data. I was ready to move on after the third message because I realized there were issues with the data itself.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Etiquetas

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by