comparison m-toolbox/classes/@sigBuilder/cb_buildExport.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 % cb_buildExport fires when the user clicks 'build & export'
2 %
3 % M Hewitson
4 %
5 % $Id: cb_buildExport.m,v 1.2 2011/04/08 08:56:35 hewitson Exp $
6 %
7 function cb_buildExport(varargin)
8
9 myh = varargin{1};
10 mainfig = varargin{end};
11
12 % Build signal
13 obj = sigBuilder.buildSignal(mainfig);
14
15 % check current workspace variables
16 basename = 'ex_obj';
17 ex = 0;
18 n = [];
19 vars = evalin('base', 'who');
20 for j=1:length(vars)
21 v = char(vars{j});
22 if strncmp(basename, v, length(basename)) == 1
23 % get the number
24 n = [n str2num(v(end-1:end))];
25 end
26 end
27
28 % Loop over selected objects
29 ex = max([n ex])+1;
30 varname = sprintf('%s_%02d', basename, ex);
31 assignin('base', varname, obj);
32
33 end