help-octave
[Top][All Lists]
Advanced

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

RE: How to make matrices of structs


From: Hall, Benjamin
Subject: RE: How to make matrices of structs
Date: Tue, 31 Aug 2004 13:32:55 -0400

Maybe this will help in the meantime, it works for me in 2.1.50

>> A.x = 5; B.x = 7; C(1) = A; C(2) = B
C =
{
  x =
  (
    [1] = 5
    [2] = 7
  )
}

-----Original Message-----
From: Mads Lindstrøm [mailto:address@hidden
Sent: Sunday, August 29, 2004 4:43 AM
To: Help Octave
Subject: How to make matrices of structs


Hi

I am trying to make a matrix of structs. I am doing it like I would do
it in Matlab:

> A.x=5; B.x=7; C=[A,B];

and it does not work. I get the following error:

> error: can't resize to negative dimension
> error: octave_base_value::matrix_value(): wrong type
> argument `struct'
> error: evaluating assignment expression near line 1,
> column 16

How do I make a matrix of structs in Octave?

I am running Octave version 2.1.40 (i386-redhat-linux-gnu) on Redhat
Linux.

Greetings,

Mads Lindstrøm





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