Mercurial > hg > ltpda
view m-toolbox/m/built_in_models/smodel/smodel_model_step.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
% A built-in model of class ao called step %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % DESCRIPTION: A built-in model of class ao called step % % CALL: % mdl = smodel(plist('built-in', 'step')); % % INPUTS: % % % OUTPUTS: % mdl - an object of class smodel % % % INFO: % <a href="matlab:utils.models.displayModelOverview('smodel_model_step')">Model Information</a> % % % REFERENCES: % % % VERSION: $Id: smodel_model_step.m,v 1.3 2011/04/29 12:25:03 luigi Exp $ % % HISTORY: % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % YOU SHOULD NOT NEED TO EDIT THIS MAIN FUNCTION function varargout = smodel_model_step(varargin) varargout = utils.models.mainFnc(varargin(:), ... mfilename, ... @getModelDescription, ... @getModelDocumentation, ... @getVersion, ... @versionTable); end %-------------------------------------------------------------------------- % AUTHORS EDIT THIS PART %-------------------------------------------------------------------------- function desc = getModelDescription desc = 'constructs a step-function of amplitude A at time toff.'; end function doc = getModelDocumentation doc = sprintf([... ''... ]); end % default version is always the first one function vt = versionTable() vt = {... 'Version 1', @version1, ... }; end % This version is ... % function varargout = version1(varargin) if nargin == 1 && ischar(varargin{1}) switch varargin{1} case 'plist' % The plist for this version of this model pl = plist(); % set output varargout{1} = pl; case 'description' varargout{1} = 'This version is version 1.'; case 'info' % Add info calls for any other models that you use to build this % model. For example: % varargout{1} = [ ... % ao_model_SubModel1('info', 'Some Version') ... % ao_model_SubModel2('info', 'Another Version') ... % ]; % varargout{1} = []; otherwise error('unknown inputs'); end return; end % build model pl = varargin{1}; a = smodel('A.*(t >= toff)'); a.setXvar('t'); a.setParams({'A','toff'}, {[],[]}); a.setName('Step at toff'); a.setDescription('Step function of amplitude A at time toff'); varargout{1} = a; end %-------------------------------------------------------------------------- % AUTHORS SHOULD NOT NEED TO EDIT BELOW HERE %-------------------------------------------------------------------------- %-------------------------------------------------------------------------- % Get Version %-------------------------------------------------------------------------- function v = getVersion v = '$Id: smodel_model_step.m,v 1.3 2011/04/29 12:25:03 luigi Exp $'; end