Last change
on this file since 863 was
723,
checked in by sommeria, 11 years ago
|
xmltree and toolbox_calib added to svn
|
File size:
667 bytes
|
Rev | Line | |
---|
[723] | 1 | function 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 | % @(#)isfield.m Guillaume Flandin 01/10/31 |
---|
| 14 | |
---|
| 15 | error(nargchk(3,3,nargin)); |
---|
| 16 | |
---|
| 17 | F = zeros(1,length(uid)); |
---|
| 18 | for i=1:length(uid) |
---|
| 19 | if isfield(tree.tree{uid(i)},parameter) |
---|
| 20 | F(i) = 1; |
---|
| 21 | end |
---|
| 22 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.