Sort cell array according to number of elements
Show older comments
A= [-0.054;-0.43;0.022] [-0.43;-0.18] [0.02;0.002;-0.202;-0.41]
Before applying cell2mat I want to reorder the array in ascending order according to the number of elements so NewA= [-0.43;-0.18] [-0.054;-0.43;0.022] [0.02;0.002;-0.202;-0.41]
Accepted Answer
More Answers (1)
Mariam Osmann
on 7 Apr 2011
0 votes
1 Comment
Sean de Wolski
on 7 Apr 2011
Mariam, please accept Andrew's answer.
Categories
Find more on Shifting and Sorting Matrices in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!