xxsimGetParameters - gets specified parameters. Syntax: retval = xxsimGetParameters('submodel_names') Inputs: submodel_names = (optional) name(s) of submodel(s) in which the parameters are found. Note: if no name is specified all parameters are retrieved. Outputs: retval = returns a structure array of the requested parameters. Examples: retval = xxsimGetParameters({'PID','Amplifier'}) - returns the list of parameters found in the submodels PID and Amplifier. See also: xxsimGetVariables, xxsimSetParameters Author: Controllab Products B.V. email: info@controllab.nl Website: http://www.controllab.nl September 2013
0001 function retval = xxsimGetParameters(varargin) 0002 % xxsimGetParameters - gets specified parameters. 0003 % 0004 % Syntax: 0005 % retval = xxsimGetParameters('submodel_names') 0006 % 0007 % Inputs: 0008 % submodel_names = (optional) name(s) of submodel(s) in which the parameters are found. 0009 % Note: if no name is specified all parameters are retrieved. 0010 % 0011 % Outputs: 0012 % retval = returns a structure array of the requested parameters. 0013 % 0014 % Examples: 0015 % retval = xxsimGetParameters({'PID','Amplifier'}) 0016 % 0017 % - returns the list of parameters found in the submodels PID and Amplifier. 0018 % 0019 % See also: xxsimGetVariables, xxsimSetParameters 0020 % 0021 % Author: Controllab Products B.V. 0022 % email: info@controllab.nl 0023 % Website: http://www.controllab.nl 0024 % September 2013 0025 0026 %------------- BEGIN CODE -------------- 0027 0028 names = {}; 0029 0030 %check input arguments 0031 if length(varargin)> 1 0032 error('Too many input arguments.'); 0033 end 0034 0035 if length(varargin) == 1 0036 if ~ischar(varargin{1}) 0037 names = varargin{1}; 0038 else 0039 names = {varargin{1}}; 0040 end 0041 end 0042 0043 retval = xxsimGetVariables(names, {'parameter'}); 0044 end