How do I sort all the columns of a table based on the first column?
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Bhavishey Thapar
el 20 de Jul. de 2022
Comentada: Bhavishey Thapar
el 20 de Jul. de 2022
I am trying to sort a table which contains datetime values in the first column and corresponding temperatures in the second column. I want to sort the table by datetime without affecting the relationship between datetime and the temperatures.
For example, if a table looks like this:
Date Temperature
2022-06-01 21
2022-05-29 18
2022-05-21 19
2022-06-04 25
2022-06-02 22
I want it to be sorted like below:
Date Temperature
2022-05-21 19
2022-05-29 18
2022-06-01 21
2022-06-02 22
2022-06-04 25
How do I achieve this?
0 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Shifting and Sorting Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!