help-octave
[Top][All Lists]
Advanced

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

Re: how to access structure elements by a key


From: Miroslaw Kwasniak
Subject: Re: how to access structure elements by a key
Date: Fri, 11 Feb 2005 14:36:12 +0100
User-agent: Mutt/1.5.6+20040907i

On Fri, Feb 11, 2005 at 02:23:33PM +0100, Rafal Mantiuk wrote:
> Hi,
> 
> How can I access an element of the structure by its key if the key is 
> given as a string. That is, having a structure:
> 
> a.a = 1;
> 
> I would like to get "1", by:
> 
> a("a")
> 
> or something similar. Actually a("a") causes an error and then assertion 
> fault and octave crash on 2.1.57:

>a.("a")
ans = 1 

;)



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