
sorting arrays in a cell array
Posted:
Nov 13, 2012 10:22 AM


Is there a way to sort a cell array of numeric arrays?
I have an Nby1 cell array, where the cells contains numeric arrays of different lengths (hence the cell array). I'd like to sort them in order of their first elements.
This is an illegal statement that sort of captures what I'm trying to do:
>> sort([myCellArray{:}(1)])
I could do this in a forloop, of course, but if there's a more Matlabcorrect way to do it, I'd like to know.

