comparison m-toolbox/classes/@modelViewer/cb_selectModel.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_SELECTMODEL callback fires when the user selects a model.
2 %
3 % M Hewitson
4 %
5 % $Id: cb_selectModel.m,v 1.4 2008/12/09 07:22:36 hewitson Exp $
6 %
7 function cb_selectModel(varargin)
8
9 myh = varargin{1};
10 mainfig = varargin{end};
11
12 % check model type
13 h = findobj(mainfig.handle, 'Tag', 'ModelTypeSelect');
14 mtypes = get(h, 'String');
15 mtype = mtypes{get(h, 'Value')};
16
17 % Get selected model
18 val = get(myh, 'Value');
19 models = get(myh, 'String');
20 model = models{val};
21
22 % draw parameters panel for this model
23 switch mtype
24 case 'ao'
25 pl = feval(['ao_model_' model], 'PLIST');
26 % pl = ii.plists(1);
27 desc = feval('help', ['ao_model_' model])
28 case 'ssm'
29 ii = ssm.getInfo('ssm', 'From Built-in Model');
30 pl = ii.plists(1);
31 pl.remove('built-in');
32 desc = feval('help', ['ssm_model_' model])
33 end
34
35 ppan = findobj(mainfig.handle, 'Tag', 'MODELVIEWERparamspanel');
36 modelViewer.buildParamsPanel(ppan, pl);
37
38
39 dtxt = findobj(mainfig.handle, 'Tag', 'MODELVIEWERmodeldescription');
40 set(dtxt, 'String', desc);
41 set(dtxt, 'TooltipString', desc);
42
43
44 end
45