statget
Access field values in statistics options structures.
📝Syntax
val = statget(options, field)
val = statget(options, field, defaultData)
📥Input Arguments
Parameter Description
options scalar options structure.
field field name or unique leading characters of a field name.
defaultData value returned when the matched field is empty.
📤Output Arguments
Parameter Description
val field value, default value, or an empty array when the field name is not uniquely matched.
📄Description

statget returns a value from an options structure. Field names are matched case-insensitively and can be abbreviated when the abbreviation is unique.

💡Examples
Read a value from an options structure.
opts = statset('kmeans');
statget(opts, 'MaxI')
Return a default value when a field is empty.
opts = statset();
statget(opts, 'TolX', 1e-6)
Used Functions
statset kmeans
Edit this page on GitHub