help-octave
[Top][All Lists]
Advanced

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

Cell array and 2.1.57


From: John W. Eaton
Subject: Cell array and 2.1.57
Date: Fri, 9 Apr 2004 11:43:24 -0500

On  9-Apr-2004, Al Niessner <address@hidden> wrote:

| I have just upgraded from 2.1.52 to 2.1.57 and found Cell to be broken.
| Attached are a test program (dld) for Cell that shows the problem
| (testCell.cc) and the gdb output (gdb.bktrace) which shows the actual
| error.

In 2.1.52, you could write

  Cell X;
  X(9) = ...;

and X would be resized to 10 elements before the assignment.  However,
this was not true for

  Cell X;
  X(9,9) = ...;

which would not resize first.

In 2.1.57, a Cell is just a thin wrapper for ArrayN<octave_value>, and
there is no implicit resizing for any of the operator()-style indexing
operations.  You need to set the size of the Cell before you use it,
same as for a numeric array or matrix object.

Perhaps this should be changed.  If you'd like to discuss it, please
start a new thread on the maintainers list.

Thanks,

jwe



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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