Sorting cell array containing alphanumeric text

7 visualizaciones (últimos 30 días)
Sam Smith
Sam Smith el 30 de Nov. de 2018
Comentada: Sam Smith el 30 de Nov. de 2018
I have a cell array, a column of which consists of alphanumeric text such as
3. Item 3
2. Item 4
5. Item 5
I want to sort the cell array so that that column is in ascending order according to the number: 1. Item 2; 2. Item 2; etc, and have the other columns sorted along with this.
  1 comentario
Sam Smith
Sam Smith el 30 de Nov. de 2018
I figured it out. It's just sortrows(A,columnnumber).

Iniciar sesión para comentar.

Respuesta aceptada

madhan ravi
madhan ravi el 30 de Nov. de 2018
sort(a) where a is your cell array

Más respuestas (0)

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!

Translated by