How do I sort a cell of data according to it's label?
Show older comments
Hi suppose I have the following data,

how do i sort the following data in the order of stridor first followed by wheeze then by crackle.
Thank you.
2 Comments
Ameer Hamza
on 14 Mar 2020
It will be helpful if you attach a small sample dataset.
dpb
on 14 Mar 2020
- Turn into categorical variable and set the output order as desired, or
- Create auxiliary variable of 1:3-->names in order wanted and sort by it.
Accepted Answer
More Answers (0)
Categories
Find more on Shifting and Sorting Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!