sort elements of cell array

2 次查看(过去 30 天)
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}

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by