Mercurial > hg > ltpda
comparison m-toolbox/classes/@minfo/clearSets.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 % CLEARSETS Clear the sets and plists of the input minfo objects. | |
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3 % | |
4 % DESCRIPTION: CLEARSETS Clear the sets and plists of the input minfo | |
5 % objects. | |
6 % | |
7 % CALL: objs = clearSets(objs) | |
8 % objs.clearSets() | |
9 % | |
10 % VERSION: $Id: clearSets.m,v 1.2 2011/01/04 18:14:27 ingo Exp $ | |
11 % | |
12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
13 function objs = clearSets(objs) | |
14 | |
15 % Decide on a deep copy or a modify | |
16 objs = copy(objs, nargout); | |
17 | |
18 for ii = 1:numel(objs) | |
19 objs(ii).sets = {}; | |
20 objs(ii).plists = []; | |
21 | |
22 % Clear the sets and plists of the children | |
23 if ~isempty(objs(ii).children) | |
24 clearSets(objs(ii).children); | |
25 end | |
26 | |
27 end | |
28 end |