Mercurial > hg > ltpda
comparison m-toolbox/classes/@LTPDAworkbench/reset.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 % RESET the current pipeline. | |
2 % | |
3 % CALL: wb.reset | |
4 % | |
5 % M Hewitson 11-10-08 | |
6 % | |
7 % $Id: reset.m,v 1.13 2011/03/31 08:00:18 hewitson Exp $ | |
8 % | |
9 function reset(varargin) | |
10 | |
11 if nargin==2 | |
12 clearWS = varargin{2}; | |
13 else | |
14 clearWS = false; | |
15 end | |
16 wb = varargin{1}; | |
17 | |
18 setappdata(0, 'LTPDAworkbench', wb); | |
19 | |
20 utils.helper.msg(utils.const.msg.PROC1, ['*** resetting pipeline ' char(awtinvoke(wb.mp, 'getDisplayTitle'))]); | |
21 awtinvoke(wb.mp, 'resetCurrentPipeline'); | |
22 | |
23 % clear structure for this diagram | |
24 cdiagName = strrep(awtinvoke(wb.mp, 'getInstanceIdentifier'), ' ', '_'); | |
25 | |
26 if evalin('base', sprintf('exist(''%s'', ''var'')', cdiagName)) == 0 | |
27 utils.helper.warn(sprintf('The variable "%s" does not exist in the MATLAB workspace. Not clearing.', cdiagName)); | |
28 end | |
29 | |
30 if clearWS | |
31 evalin('base', sprintf('%s=[];', cdiagName)); | |
32 end | |
33 | |
34 wb.executing = false; | |
35 setappdata(0, 'LTPDAworkbench', []); | |
36 | |
37 end |