source: trunk/src/@xmltree/move.m @ 737

Last change on this file since 737 was 723, checked in by sommeria, 11 years ago

xmltree and toolbox_calib added to svn

File size: 725 bytes
Line 
1function 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
14error(nargchk(3,3,nargin));
15
16p = tree.tree{uida}.parent;
17tree.tree{p}.contents(find(tree.tree{p}.contents==uida)) = [];
18tree.tree(uidb).contents = [tree.tree(uidb).contents uida];
Note: See TracBrowser for help on using the repository browser.