0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 function executeCommands(src, cmds)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 for kk=1:numel(cmds)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 disp(sprintf('$$$ executing: %s', cmds{kk}));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 evalin('base', cmds{kk});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 if isa(src, 'LTPDAworkbench')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 awtinvoke(src.mp, 'updateProgressOfCurrentDiagram');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 drawnow;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 newErr = MException('LTPDA:runPipeline', 'Can not execute: %s', cmds{kk});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 err = err.addCause(newErr);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 throw(err);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 end
|