|
From: | Quentin Spencer |
Subject: | Re: how to check if this exists |
Date: | Fri, 03 Feb 2006 12:55:25 -0600 |
User-agent: | Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) |
Corbin Champion wrote:
If I create a variable x and x has an element x.name = "tom" if I do exist('x') I get a value of 1....good, but if I do exist('x.name') I get a value of 0 even though this exists.Is this the intended behavior? Is there a different function I should use for this?
Yes and yes. See the example below: octave:1> x.x=1; octave:2> isfield(x,'x') ans = 1 octave:3> isfield(x,'y') ans = 0 -Quentin ------------------------------------------------------------- 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 -------------------------------------------------------------
[Prev in Thread] | Current Thread | [Next in Thread] |