matrix of first & last names into alphabetical order of last name without using the sort command?
2 views (last 30 days)
Show older comments
How do I sort a matrix that contains first & last names, into alphabetical order of last name without using the sort command? I have a matrix of 2 columns but different lengths of names. But I need to put them in alphabetic order by last name without using the builtin sort function command. Maybe by using Find and char?
1 Comment
Adam
on 3 Nov 2016
Just write your own sort function if you can't use the builtin. It's one of the standard algorithmic recipes with loads of different implementations that you can easily lookup.
Answers (0)
See Also
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!