view m-toolbox/classes/@modelViewer/buildObject.m @ 6:2b57573b11c7
database-connection-manager
Add utils.mysql.execute
author
Daniele Nicolodi <nicolodi@science.unitn.it>
date
Mon, 05 Dec 2011 16:20:06 +0100 (2011-12-05)
parents
f0afece42f48
children
line source
+ − function obj = buildObject(mainfig)
+ −
+ − % get model type
+ − h = findobj(mainfig.handle, 'Tag', 'ModelTypeSelect');
+ − models = get(h, 'String');
+ − modelType = models{get(h, 'Value')};
+ −
+ − % get model name
+ − h = findobj(mainfig.handle, 'Tag', 'ModelSelect');
+ − models = get(h, 'String');
+ − model = models{get(h, 'Value')};
+ −
+ − % get parameters
+ − h = findobj(mainfig.handle, 'Tag', 'MODELVIEWERparamspanel');
+ − pl = modelViewer.getParamsFromPanel(h);
+ −
+ − % Pass to constructor
+ − obj = [];
+ − switch modelType
+ − case 'ao'
+ −
+ − pl = combine(plist('built-in', model), pl);
+ − obj = feval('ao', pl);
+ −
+ − case 'ssm'
+ −
+ − pl = combine(plist('built-in', model), pl);
+ − obj = feval('ssm', pl);
+ −
+ − otherwise
+ − error('model type %s is currently unsupported', modelType);
+ − end
+ − end