image thumbnail

Sorting a Cell Array

version (2.43 KB) by Jeff Jackson
This function will sort a cell array even if it is mixed.


Updated 5 Mar 2008

View License

This function sorts a cell array, even if it contains character strings and numeric values (i.e. mixed). The only restriction is that it assumes that each column contains either numeric values or character strings, not both. It sorts the rows in ascending order. Note that it allows more than one column to be sorted according to the priority input by the user.

Cite As

Jeff Jackson (2022). Sorting a Cell Array (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2006b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!