[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible bug in the assignment operator when handling arrays of stru
From: |
Søren Hauberg |
Subject: |
Re: Possible bug in the assignment operator when handling arrays of structs which hold arrays of structs (or I just don't know how to correctly phrase the search on the bugs list) |
Date: |
Fri, 09 Sep 2005 00:05:53 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.6 (X11/20050831) |
Hi,
Brendan Drew wrote:
I'm afraid this is a bit involved, [SNIP]
Yes, it seems a bit involved, so I'm not sure if I understand you
question. I've sniped quite a bit of your mail, sorry everybody...
If I understand you correctly a "down-scaled" version of your problem is
something like this:
a.vec = rand(1,3);
b(1,1) = a;
b(1,2) = a
which gives you:
b =
{
vec =
(,
[1] =
0.16729 0.61153 0.13968
[2] =
0.16729 0.61153 0.13968
,)
}
What you might want is something like this (using cell array instead of
a matrix):
c{1,1} = a;
c{1,2} = a
which gives you
c =
{
[1,1] =
{
vec =
0.16729 0.61153 0.13968
}
[1,2] =
{
vec =
0.16729 0.61153 0.13968
}
}
As I said in the beginning, I don't really understand your question, but
I thought there might be a slight chance that my quess could help you :-)
/Søren
-------------------------------------------------------------
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
-------------------------------------------------------------