xxsimGetInitialValues

PURPOSE ^

xxsimGetInitialValues - gets specified initial values.

SYNOPSIS ^

function retval = xxsimGetInitialValues(varargin)

DESCRIPTION ^

 xxsimGetInitialValues - gets specified initial values.
 To get initial values, the 20-sim model should be processed first.

 Syntax: 
   retval = xxsimGetInitialValues({'submodel_names'})

 Inputs:
   submodel_names = (optional)name(s) of submodel(s) in which the initial values are found.
                      Note: if left empty all initial values are retrieved.
 
 Outputs: 
   retval = returns a structure array of the requested initial values.
 
 Examples:
   retval = xxsimGetInitialValues({'PID','Amplifier'})
   
     - returns the list of parameters in the submodels PID and Amplifier. 

 See also: xxsimGetVariables, xxsimSetInitialValues

 Author: Controllab Products B.V.
 email: info@controllab.nl
 Website: http://www.controllab.nl
 September 2013

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

Generated on Sun 10-Dec-2017 19:24:51