help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cell{1:5}=1 not working for me!!!


From: Jordi Gutiérrez Hermoso
Subject: Re: cell{1:5}=1 not working for me!!!
Date: Thu, 31 May 2012 08:43:22 -0400

On 31 May 2012 07:07, Francesco Potortì <address@hidden> wrote:
>>The first fact is easy to understand: you can assign to a cell with
>>any of the operators () or {}.
>
> Is there an historical reason to this, I suppose, or more simply a
> Matlab compatibility reason.  I find this ambiguity confusing.  Is there
> a recommended style?

What exactly is the ambiguity with () and {}? They're different things.

Indexing with {} gives you cs-lists, possibly with only one element.
Indexing with you () gives you subcells. You can always assign a
subcell of compatible size to a subcell, but you can only assign to
cs-lists as long as they are one-element.

If you think the following needs to be better written, please let me
know, and we can reword it:

    http://www.gnu.org/software/octave/doc/interpreter/Indexing-Cell-Arrays.html

Thanks,
- Jordi G. H.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]