Sorting cell array containing alphanumeric text

7 vues (au cours des 30 derniers jours)
Sam Smith
Sam Smith le 30 Nov 2018
Commenté : Sam Smith le 30 Nov 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 commentaire
Sam Smith
Sam Smith le 30 Nov 2018
I figured it out. It's just sortrows(A,columnnumber).

Connectez-vous pour commenter.

Réponse acceptée

madhan ravi
madhan ravi le 30 Nov 2018
sort(a) where a is your cell array

Plus de réponses (0)

Catégories

En savoir plus sur Shifting and Sorting Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by