Sorting a Cell Array
by Jeff Jackson
25 Jan 2007
(Updated 05 Mar 2008)
This function will sort a cell array even if it is mixed.
|
Watch this File
|
| File Information |
| Description |
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. |
| MATLAB release |
MATLAB 7.3 (R2006b)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (19) |
| 03 Aug 2007 |
Alejandro Endo
|
|
|
| 19 Sep 2007 |
Fabio Lamanna
|
|
|
| 12 Nov 2007 |
vasilis papadourakis
|
|
|
| 16 Dec 2007 |
Omar Mukhtar
|
|
|
| 08 Feb 2008 |
Florian Wamser
|
|
|
| 04 Mar 2008 |
J Ahmed
|
|
|
| 06 May 2008 |
P. V.A.
|
|
|
| 10 May 2008 |
Lars Christensen
|
|
|
| 18 Jul 2008 |
T S
|
|
|
| 07 Jul 2010 |
Sachin Singh
|
|
|
| 10 Sep 2010 |
Jack B.
|
|
|
| 15 Sep 2010 |
Sachin Singh
|
|
|
| 05 Jan 2011 |
jayesh
|
|
|
| 07 Feb 2011 |
Leila
|
|
|
| 14 Feb 2011 |
Simon Cichosz
|
|
|
| 01 Jun 2011 |
Bob Hamans
|
|
|
| 01 Jun 2011 |
Bob Hamans
|
|
|
| 02 Jun 2011 |
Bob Hamans
|
|
|
| 24 Oct 2011 |
Jessica
|
|
|
| Updates |
| 26 Jan 2007 |
I uploaded a previous bugged version, not the final one, sorry folks. |
| 03 Mar 2008 |
This script was updated to add the functionality for sorting according to the desired user specified direction (ascending or descending). |
| 05 Mar 2008 |
The update for the MODE functionality does not work correctly as Mathworks sort.m function does not allow cell arrays to be sorted when using the DIM argument. |
|
Contact us at files@mathworks.com