Mercurial > hg > ltpda
diff m-toolbox/classes/@sigBuilder/cb_buildSave.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m-toolbox/classes/@sigBuilder/cb_buildSave.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,24 @@ +% CB_BUILDSAVE fires when the user clicks 'build & save' +% +% M Hewitson +% +% $Id: cb_buildSave.m,v 1.1 2008/10/19 11:42:40 hewitson Exp $ +% +function cb_buildSave(varargin) + + myh = varargin{1}; + mainfig = varargin{end}; + + % Build signal + obj = sigBuilder.buildSignal(mainfig); + + % Get a file name from the user + [filename, pathname] = uiputfile({'*.xml', 'LTPDA XML File (*.xml)'; '*.mat', 'MAT File (*.mat)'}, 'Save File as'); + + if isequal(filename,0) || isequal(pathname,0) + disp('Cancelled.') + else + fname = fullfile(pathname, filename); + save(obj, fname); + end +end