|
|
Re: sorting arrays in a cell array
Posted:
Nov 14, 2012 5:21 PM
|
|
"dpb" <none@non.net> wrote in message news:k813je$4hr$1@speranza.aioe.org... > On 11/14/2012 3:12 PM, Bruce Elliott wrote: > ... > >> I'm still not sure exactly what you mean by a "multi-level index", which >> you stated earlier that you don't have in your version of Matlab. Do you >> mean the ability to write something like, >> >> x = myCellArray{3,4}(5,6); ? >> >> That's just a basic bit cell array functionality, which has been around >> a pretty long time, I believe. (I can't remember when cell arrays were >> first introduced, which ought to mean that it was quite a while ago, >> although lately it doesn't mean that quite the way it used to ...) > > <http://www.mathworks.com/help/matlab/matlab_prog/multilevel-indexing-to-access-parts-of-cells.html> > > It's _now_ "basic" cell array functionality but it wasn't for at least a > couple of releases after cell arrays were first introduced. > > Cell arrays existed at least as far back as R11; I'm currently at R12 > which is roughly '99/'00 time frame.
Cell arrays were introduced in MATLAB 5.0 (R10). For reference some of the other features introduced in that release, according to the WHATSNEW function, were:
struct arrays multidimensional arrays the original MATLAB object system SWITCH WARNING subfunctions ODE solvers
> But the second level of indexing ('multi-level') wasn't introduced until > sometime after that. If I do > > >> c(2,3)={rand(4)} > c = > [] [] [] > [] [] [4x4 double] > >> c(2,3) > ans = > [4x4 double] > >> c(2,3){1,1} > ??? Error: () Indexing must appear last in an index expression.
That still doesn't work. Use c{2, 3}(1, 1) instead. I tried it and it works in release R10.
*snip*
-- Steve Lord slord@mathworks.com To contact Technical Support use the Contact Us link on http://www.mathworks.com
|
|