Main Content

optimget

Optimization options values

Syntax

val = optimget(options,'param')
val = optimget(options,'param',default)

Description

val = optimget(options,'param') returns the value of the specified parameter in the optimization options structure options. You need to type only enough leading characters to define the parameter name uniquely. Case is ignored for parameter names.

val = optimget(options,'param',default) returns default if the specified parameter is not defined in the optimization options structure options. Note that this form of the function is used primarily by other optimization functions.

Examples

This statement returns the value of the Display optimization options parameter in the structure called my_options.

val = optimget(my_options,'Display')

This statement returns the value of the Display optimization options parameter in the structure called my_options (as in the previous example) except that if the Display parameter is not defined, it returns the value 'final'.

optnew = optimget(my_options,'Display','final');

Extended Capabilities

Version History

Introduced before R2006a