Borrar filtros
Borrar filtros

sort elements of cell array

1 visualización (últimos 30 días)
Tha saliem
Tha saliem el 11 de Abr. de 2017
Comentada: Tha saliem el 11 de Abr. de 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}

Respuesta aceptada

KSSV
KSSV el 11 de Abr. de 2017
x{1,1}=[2;1;3] ;
x{2,1}=[4;2;1;3] ;
iwant = cellfun(@sort,x,'un',0)

Más respuestas (0)

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by