how to sort a cell array based on another cell array
Show older comments
basically i have this cell array:
A = {1,18,2,1,6,8,3,1,1,1}
B = {the,keep,up,run,a,fear,have,tik,love,vik}
basically each element in B have the number of occurances in A, what i need to do is i want to sort A in descendant order ( 18,8,6...) but also i want its corresponding B to sort with it how can i achieve that ?
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!