help-octave
[Top][All Lists]
Advanced

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

structures in cell arrays


From: Paul Griffiths
Subject: structures in cell arrays
Date: Wed, 24 Sep 2003 10:52:21 -0500

Hi,
I have seen that a cell array element can be a structure. (See:
http://www.octave.org/octave-lists/archive/octave-maintainers.2002/msg00012.html)

The example given is:
octave:1> X{2,2}.bar(2).foo(2:3,2:3) = rand(2)

But I get the following error message when I try this statement:
error: matrix cannot be indexed with .
error: assignment failed, or no method for `<unknown type> = matrix'
error: evaluating assignment expression near line 1, column 28
octave:1> 

I have tried this on versions 2.1.44 and 2.1.50. I don't even need
structure arrays. It would be sufficient if I could assign X{2,2}.a = 1. 

Is there a patch? I also wish to load and save cell arrays with structures.
If need be, I would consider contributing code to get this to work.

Thanks!
Paul Griffiths




-------------------------------------------------------------
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]