sort elements of cell array

1 vue (au cours des 30 derniers jours)
Tha saliem
Tha saliem le 11 Avr 2017
Commenté : Tha saliem le 11 Avr 2017
hey i have a question that how to sort elements of cell array at once Like:
x{1,1}={2;1;3}
x{2,1}={4,2;1;3}
and result should be like this:
x{1,1}={1;2;3}; x{2,1}={1,2;3;4}

Réponse acceptée

KSSV
KSSV le 11 Avr 2017
x{1,1}=[2;1;3] ;
x{2,1}=[4;2;1;3] ;
iwant = cellfun(@sort,x,'un',0)
  1 commentaire
Tha saliem
Tha saliem le 11 Avr 2017
Thank you so much

Connectez-vous pour commenter.

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