statget
statistics: value = statget (options, name)
statistics: value = statget (options, name, default)
Read one option out of a statistics options structure.
value = statget (options, name) returns the value
the option name carries in options, or [] when that
option is unset. options is a structure as built by statset,
although any structure is accepted.
value = statget (options, name, default)
returns default instead whenever the option is unset, which is the
form a calling function uses to fall back on its own default. Note that
default is returned when the option is empty, not only when it
is absent, since an empty option is precisely how statset spells
"unset".
name is matched case-insensitively, and may be abbreviated to any
leading portion that singles out one option: statget (options,
"MaxI") reads "MaxIter". An abbreviation matching more than one
option raises, rather than choosing between them; an exact match is taken
as exact even where it is also a prefix of a longer name.
See also: statset
Source Code: statget
Read an option, falling back on a default when it is unset
options = statset ('nlinfit');
maxiter = statget (options, 'MaxIter')
maxiter = 200
tolbnd = statget (options, 'TolBnd', 1e-6)
tolbnd = 1.0000e-06