Last change
on this file since 728 was
723,
checked in by sommeria, 11 years ago
|
xmltree and toolbox_calib added to svn
|
File size:
885 bytes
|
Line | |
---|
1 | function tree = set(tree,uid, parameter, value) |
---|
2 | % XMLTREE/SET Method (set object properties) |
---|
3 | % FORMAT tree = set(tree,uid,parameter,value) |
---|
4 | % |
---|
5 | % tree - XMLTree object |
---|
6 | % uid - array (or cell) of uid's |
---|
7 | % parameter - property name |
---|
8 | % value - property value |
---|
9 | %_______________________________________________________________________ |
---|
10 | % |
---|
11 | % Set object properties given its uid and pairs parameter/value |
---|
12 | % The tree parameter must be in input AND in output |
---|
13 | %_______________________________________________________________________ |
---|
14 | % @(#)set.m Guillaume Flandin 02/03/27 |
---|
15 | |
---|
16 | error(nargchk(4,4,nargin)); |
---|
17 | |
---|
18 | if iscell(uid), uid = [uid{:}]; else uid = uid(:); end |
---|
19 | |
---|
20 | for i=1:length(uid) |
---|
21 | tree.tree{uid(i)} = builtin('subsasgn', tree.tree{uid(i)}, struct('type','.','subs',parameter), value); |
---|
22 | %tree.tree{uid(i)} = setfield(tree.tree{uid(i)},parameter,value); |
---|
23 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.