Main Content

get

Get fit options structure property names and values

Description

get(options)displays all property names and values of the fit options structureoptions.

s= get(options)returns a copy of the fit options structureoptionsas the structures.

example

value= get(options,field)returns the value of the propertyfieldof the fit options structureoptions.fieldcan be a cell array of character vectors, in which casevalueis also a cell array.

Examples

collapse all

Create afitoptions结构和调用getfunction to obtain its property values.

options = fitoptions('fourier1'); methodOptions = get(options,'Method') maxIterOptions = get(options,'MaxIter') set(options,'Maxiter',1e3); maxIterOptions = get(options,'MaxIter')
methodOptions = 'NonlinearLeastSquares' maxIterOptions = 400 maxIterOptions = 1000

Property values can also be referenced and assigned using the dot notation. For example:

options.MaxIter
ans = 1000
options.MaxIter = 500; options.MaxIter
ans = 500

Input Arguments

collapse all

fitoptionsobject of which you want to get the property names and values, specified as afitoptionsobject.

Property value of thefitoptionsobjectoptionsthat you want to get, specified as a character vector, or a cell array of character vectors.

Data Types:single|double

Output Arguments

collapse all

Copy of thefitoptionsobject, returned as afitoptionobject.

Property value of thefitoptionsobjects, returned as a scalar, a vector, a matrix, or a cell.

See Also

|

Introduced before R2006a