Rank: 1298 based on 118 downloads (last 30 days) and 2 files submitted
photo

Jeff Jackson

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Jeff View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
05 Mar 2008 Sorting a Cell Array This function will sort a cell array even if it is mixed. Author: Jeff Jackson structures, cell arrays, sort cell array, sortcellarray 101 25
  • 4.86364
4.9 | 23 ratings
23 Jan 2008 Parse Strings Using Delimiters These two functions parse a string or cell array of strings based on one or more delimiters. Author: Jeff Jackson strings, parse strtok delimite... 17 5
  • 4.6
4.6 | 5 ratings
Comments and Ratings by Jeff View all
Updated File Comments Rating
14 Aug 2014 Round Serial Date Numbers or Date Vectors Round Serial Date Numbers or Date Vectors to the nearest desired unit (round/floor/ceiling). Author: Stephen Cobeldick

14 Aug 2014 Round Serial Date Numbers or Date Vectors Round Serial Date Numbers or Date Vectors to the nearest desired unit (round/floor/ceiling). Author: Stephen Cobeldick

23 Jun 2011 ismonotonic Determines whether or not a vector or matrix is monotonically increasing or decreasing. Author: Richie Cotton

Thanks for the contribution Richie.

It works as expected and replaces one I had been using that did not.

Jeff

Comments and Ratings on Jeff's Files View all
Updated File Comment by Comments Rating
24 Sep 2014 Parse Strings Using Delimiters These two functions parse a string or cell array of strings based on one or more delimiters. Author: Jeff Jackson Santosh

28 Aug 2014 Sorting a Cell Array This function will sort a cell array even if it is mixed. Author: Jeff Jackson Cobeldick, Stephen

27 Aug 2014 Sorting a Cell Array This function will sort a cell array even if it is mixed. Author: Jeff Jackson Cobeldick, Stephen

MATLAB's standard "sortrows" function provides identical functionality (sorting a cell array with columns of strings and/or columns of numerics), but also allows these to be any class of numeric, not just 'double' like in this submission. In fact "sortrows" also sorts plain-old numeric and char arrays, which is a significant advantage over this submission. Some people may appreciate that this submission is a little faster than "sortrows", although this does not seem to be intentional. This submission has reasonably tidy code, though a few things are needed to make it really useful to use:
- The H1 line should be more descriptive (e.g.: 'sort the rows of a cell array containing columns of numeric or char data').
- At least one complete (working) example, preferably more.
- A list of functions in a 'See Also' line.
Some points detract also from the quality of the output:
- Accepts an N-D cell array, but reshapes this to return a 2-D cell array with the same number of rows as the input array.
- Does not return the sort indices.
- Though the documentation says that it works with 'mixed cell arrays containing character strings and numeric values', in fact each column must contain either char or numeric data exclusively, just like "sortrows" does: it really would be a significant advantage over "sortrows" if true mixed sorting had been implemented in this submission.

Although the function (mostly) does what is claims to do, there seems little advantage to using this submission over the standard MATLAB function "sortrows", which provides the same functionality over a wider range of data classes.

Jessica also observed in her comment that this submission does not provide a natural-order sort. Several of my submissions provide natural-order sorting, e.g. for sorting the rows of a cell of strings:
http://www.mathworks.com/matlabcentral/fileexchange/47433
Or for sorting a cell array of filenames:
http://www.mathworks.com/matlabcentral/fileexchange/47434
Both of these require this customizable natural-order sort function:
http://www.mathworks.com/matlabcentral/fileexchange/34464

24 Jul 2014 Sorting a Cell Array This function will sort a cell array even if it is mixed. Author: Jeff Jackson James

Matlab function: sortrows() does this.

01 Feb 2014 Sorting a Cell Array This function will sort a cell array even if it is mixed. Author: Jeff Jackson Mohit

Thanks a lot!

Contact us