From help-request at octave dot org Fri Feb 11 07:31:01 2005 Subject: Re: how to access structure elements by a key From: Miroslaw Kwasniak To: help at octave dot org Date: Fri, 11 Feb 2005 14:36:12 +0100 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 -------------------------------------------------------------