Order two related vectors
Show older comments
Hi, I have 2 vectors: one numeric vector and a string vector ( a cell array to be exact). String one refers to value one, string two to value two and so on. I want to sort the numeric vector and, according to the result, order the string vector too, for example:
v1 v2 2 "my name is" 1 "hello" 3 "Bob"
after the ordering v1 v2 1 "hello" 2 "my name is" 3 "bob"
How can I accomplish this?
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!