source: trunk/src/@xmltree/isfield.m @ 1152

Last change on this file since 1152 was 925, checked in by sommeria, 9 years ago

xmltree updated

File size: 768 bytes
Line 
1function F = isfield(tree,uid,parameter)
2% XMLTREE/ISFIELD Is parameter a field of tree{uid} ?
3% FORMAT F = isfield(tree,uid,parameter)
4%
5% tree      - a tree
6% uid       - uid of the element
7% parameter - a field of the root tree
8% F         - 1 if present, 0 otherwise
9%__________________________________________________________________________
10%
11% Is parameter a field of tree{uid} ?
12%__________________________________________________________________________
13% Copyright (C) 2002-2011  http://www.artefact.tk/
14
15% Guillaume Flandin
16% $Id: isfield.m 4460 2011-09-05 14:52:16Z guillaume $
17
18
19%error(nargchk(3,3,nargin));
20
21F = zeros(1,length(uid));
22for i=1:length(uid)
23    if isfield(tree.tree{uid(i)},parameter)
24        F(i) = 1;
25    end
26end
Note: See TracBrowser for help on using the repository browser.