Mercurial > hg > ltpda
view m-toolbox/m/gui/ltpdv/callbacks/ltpdv_export_objects.m @ 52:daf4eab1a51e database-connection-manager tip
Fix. Default password should be [] not an empty string
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 07 Dec 2011 17:29:47 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line source
function ltpdv_export_objects(varargin) % Handles myh = varargin{1}; mainfig = varargin{end}; % check current workspace variables basename = 'ex_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 % Get selected objects objs = ltpdv_get_selected_objs(mainfig); % Loop over selected objects for j=1:numel(objs) obj = objs{j}; ex = max([n ex])+1; varname = sprintf('%s_%02d', basename, ex); assignin('base', varname, obj); end % END