Main Content

get

Get fit options structure property names and values

Description

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

s = get(options) returns a copy of the fit options structure options as the structure s.

example

value = get(options,field) returns the value of the property field of the fit options structure options. field can be a cell array of character vectors, in which case value is also a cell array.

Examples

collapse all

Create a fitoptions structure and call the get function 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

fitoptions object of which you want to get the property names and values, specified as a fitoptions object.

Property value of the fitoptions object options that 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 the fitoptions object, returned as a fitoption object.

Property value of the fitoptions object s, returned as a scalar, a vector, a matrix, or a cell.

See Also

|

Introduced before R2006a