|
|
Re: sorting arrays in a cell array
Posted:
Nov 14, 2012 9:59 AM
|
|
"dpb" <none@non.net> wrote in message news:k7trk4$cmj$1@speranza.aioe.org... > On 11/13/2012 10:01 AM, Bruce Elliott wrote: > ... > >> Actually, it's the syntax myCellArray{:}(1) that's illegal. You can do >> myCellArray{1}(1), but the {:} is not allowed in combination with the >> (1). > > Well that pretty much sucks--looks like time for enhancement request. > > That's a pretty major weakness in multi-level indexing if you can't > generalize it.
One reason why that's not allowed: there's no guarantee that any particular cell of myCellArray contains a 1st element.
myCellArray = {1:10, [], 11, 12}
If I were just displaying:
>> myCellArray{:}(1)
what should be displayed? Should it error right away (only displaying once the command is fully executed) or should it display the first element of the comma-separated list then throw the error?
-- Steve Lord slord@mathworks.com To contact Technical Support use the Contact Us link on http://www.mathworks.com
|
|