octave-maintainers
[Top][All Lists]
Advanced

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

Re: Cell array changes for Octave


From: Cai Jianming
Subject: Re: Cell array changes for Octave
Date: Tue, 7 May 2002 08:10:01 -0500

Hi,

> Octave, along with some modifications.  There is still some more work
> to do to properly support "x{ }" style indexing, but most of the other

IMHO, I think we would need to define the proper semantics of each
indexing/assignment before the implementation. Should we follow Matlab?

>   octave:3> y(1,2) = x
>   error: A(I, J) = X: X must be a scalar or the number of elements in I
must
>   error: match the number of rows in X and the number of elements in J
must
>   error: match the number of columns in X
>   error: evaluating assignment expression near line 3, column 8

> So you can see that indexing to insert a cell inside a cell doesn't
> work yet.  I need to make "x{ }" style indexing and indexed assignment
> call different functions than are used for the "x( )" style indexing
> and indexed assignmend operations.

y(1,2) = {x} will work as intended, i.e. embed cell x as a cell element of
y.

>   * Should we implement lists as a special case of Cell arrays?  I
>     think yes, but maybe there is a reason not to?  Should lists be
>     marked as deprecated and removed in a future version of Octave?

Actually, I don't see the need for lists once we have proper support for
cell arrays. In fact, passing of parameters for functions should be done via
cells, as done in Matlab.

Regards,
Jianming


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



reply via email to

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