Main Content

gaoptimget

(Not recommended) Obtain values of genetic algorithm options structure

gaoptimget is not recommended. Instead, query options using dot notation. For more information, see Version History.

Syntax

val = gaoptimget(options, 'name')
val = gaoptimget(options, 'name', default)

Description

val = gaoptimget(options, 'name') returns the value of the parameter name from the genetic algorithm options structure options. gaoptimget(options, 'name') returns an empty matrix [] if the value of name is not specified in options. It is only necessary to type enough leading characters of name to uniquely identify it. gaoptimget ignores case in parameter names.

val = gaoptimget(options, 'name', default) returns the 'name' parameter, but will return the default value if the name parameter is not specified (or is []) in options.

Version History

Introduced before R2006a

collapse all