Last change
on this file since 731 was
723,
checked in by sommeria, 11 years ago
|
xmltree and toolbox_calib added to svn
|
File size:
725 bytes
|
Rev | Line | |
---|
[723] | 1 | function tree = move(tree,uida, uidb) |
---|
| 2 | % XMLTREE/MOVE Move (move a subtree inside a tree from A to B) |
---|
| 3 | % |
---|
| 4 | % tree - XMLTree object |
---|
| 5 | % uida - initial position of the subtree |
---|
| 6 | % uidb - parent of the final position of the subtree |
---|
| 7 | %_______________________________________________________________________ |
---|
| 8 | % |
---|
| 9 | % Move a subtree inside a tree from A to B. |
---|
| 10 | % The tree parameter must be in input AND in output |
---|
| 11 | %_______________________________________________________________________ |
---|
| 12 | % @(#)move.m Guillaume Flandin 02/04/08 |
---|
| 13 | |
---|
| 14 | error(nargchk(3,3,nargin)); |
---|
| 15 | |
---|
| 16 | p = tree.tree{uida}.parent; |
---|
| 17 | tree.tree{p}.contents(find(tree.tree{p}.contents==uida)) = []; |
---|
| 18 | tree.tree(uidb).contents = [tree.tree(uidb).contents uida]; |
---|
Note: See
TracBrowser
for help on using the repository browser.