Mercurial > hg > ltpda
view m-toolbox/classes/@modelViewer/cb_buildModel.m @ 1:2014ba5b353a database-connection-manager
Remove old code
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Sat, 03 Dec 2011 18:13:55 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line source
function cb_buildModel(varargin) myh = varargin{1}; mainfig = varargin{end}; obj = modelViewer.buildObject(mainfig); % Put object in workspace % check current workspace variables basename = 'mdl_obj'; ex = 0; n = []; vars = evalin('base', 'who'); for j=1:length(vars) v = char(vars{j}); if strncmp(basename, v, length(basename)) == 1 % get the number n = [n str2num(v(end-1:end))]; end end % Loop over selected objects ex = max([n ex])+1; varname = sprintf('%s_%02d', basename, ex); assignin('base', varname, obj); end