[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getstruct, setstruct, etc.
From: |
Andy Adler |
Subject: |
Re: getstruct, setstruct, etc. |
Date: |
Wed, 21 Jul 2004 17:16:09 -0400 (EDT) |
On Wed, 21 Jul 2004, John W. Eaton wrote:
> On 21-Jul-2004, Andy Adler <address@hidden> wrote:
>
> | QUESTION#2:
> | Matlab claims that GETFIELD is deprecated in favour of "dynamic
> | field names". Does anyone know what the *$#@ that is?
>
> octave:1> x.a = 1
> octave:2> f = "a"
> octave:3> x.(f)
> ans = 1
Thanks, this works for me in Matlab (R13) as well.
I also need to test for existance of fields, but this seems to
work, in both languates, also.
> a.b.c=1
> isfield(a.b,'c')
ans= 1
> bb='b';
> isfield(a.(bb),'c')
ans= 1
--
Andy Adler
- getstruct, setstruct, etc., Andy Adler, 2004/07/21
- getstruct, setstruct, etc., John W. Eaton, 2004/07/21
- Re: getstruct, setstruct, etc.,
Andy Adler <=
- Re: getstruct, setstruct, etc., Paul Kienzle, 2004/07/21
- Re: getstruct, setstruct, etc., Andy Adler, 2004/07/22
- Re: getstruct, setstruct, etc., Paul Kienzle, 2004/07/22
- Re: getstruct, setstruct, etc., Andy Adler, 2004/07/22
- Re: getstruct, setstruct, etc., Paul Kienzle, 2004/07/22
- Re: getstruct, setstruct, etc., Etienne Grossmann, 2004/07/22
- Re: getstruct, setstruct, etc., Paul Kienzle, 2004/07/22
- Re: getstruct, setstruct, etc., Etienne Grossmann, 2004/07/23