Products & Services Solutions Academia Support User Community Company

Learn more about Model-Based Calibration   

addObjective - Add objective to optimization

Syntax

options = addObjective(options, label, typestr)

Description

A method of cgoptimoptions. Adds a placeholder for an objective function to the optimization. The string label is used to refer to the constraint in CAGE.

typestr can take one of four values, 'max', 'min', 'min/max', or 'helper'.

Examples

opt = addObjective(opt, 'newObj', 'max') 

Adds an objective function labeled newObj to the optimization and indicates that it is to be maximized.

opt = addObjective(opt, 'newObj', 'min/max')

Adds an objective function labeled newObj to the optimization and indicates that the user should be allowed to choose whether it is minimized or maximized from CAGE.

opt = addObjective(opt, 'newObj2', 'helper')

Adds an objective function labeled newObj2 to the optimization. The string 'helper' indicates that the function is used as part of the determination of the cost function but is not directly minimized or maximized.

See Also

getObjectives, setObjectivesMode, getObjectivesMode, removeObjective

  


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