Products & Services Solutions Academia Support User Community Company

Learn more about Model-Based Calibration   

addParameter - Add parameter to optimization

Syntax

options = addParameter(options, Label, Type, Value)
options = addParameter(options, Label, Type, Value, DisplayName)

Description

A method of cgoptimoptions.

options = addParameter(options, Label, Type, Value) adds a parameter to the optimization. The string Label is used to refer to the parameter in the Evaluate section of your script. You must specify a default value in Value. The table below lists the parameter types that are supported along with how to specify their Type and Value.

Parameter TypeTypeValue
Real number 'number' Real scalar
Integer 'integer' Integer scalar
Enumerated list{'list', {list items}}One of {list items}
Boolean 'boolean' true or false

Note: The {list items} cell array for an enumerated list must be a cell array of strings, one for each list member.

You can restrict a numeric parameter ('number' or 'integer') to a valid range. To do this, specify a cell array for Type from the following:

Range typeType
Positive{TYPESTR, 'positive'}
Negative{TYPESTR, 'negative'}
User defined{TYPESTR, [a b]}

where TYPESTR is either 'number' or 'integer'. Note that the user-defined range type strictly includes the limits, whereas the positive and negative range types exclude zero. Furthermore, the default Value must lie in the specified range.

options = addParameter(options, Label, Type, Value, DisplayName) allows you to add a more descriptive label for the parameter in the CAGE Optimization Parameters GUI. Note that you still must refer to the parameter by label in the Evaluate section of your script.

See Also

getParameters, getParam, removeParameter

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS