comparison m-toolbox/classes/@repogui2/getWorkspaceObjs.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 % Get a list of LTPDA objects in the MATLAB workspace
2 %
3 % M Hewitson
4 %
5 % $Id: getWorkspaceObjs.m,v 1.2 2008/10/19 12:25:37 hewitson Exp $
6 %
7
8 function objs = getWorkspaceObjs()
9
10 % get base workspace variables
11 ws_vars = evalin('base','whos');
12
13 objs = [];
14 for j=1:length(ws_vars)
15
16 cmd = sprintf('obj = evalin(''base'', ''%s'');', ws_vars(j).name);
17 eval(cmd)
18 if isa(obj, 'ltpda_uo')
19 objs = [objs ws_vars(j)];
20 end
21 end
22 end