set

Assign values in fit options structure

Syntax

set(options)
s = set(options)
set(options,fld1,val1,fld2,val2,...)
set(options,flds,vals)

Description

set(options) displays all property names of the fit options structure options. If a property has a finite list of possible string values, these values are also displayed.

s = set(options) returns a structure s with the same property names as options. If a property has a finite list of possible string values, the value of the property in s is a cell array containing the possible string values. If a property does not have a finite list of possible string values, the value of the property in s is an empty cell array.

set(options,fld1,val1,fld2,val2,...) sets the properties specified by the strings fld1, fld2, ... to the values val1, val2, ..., respectively.

set(options,flds,vals) sets the properties specified by the cell array of strings flds to the corresponding values in the cell array vals.

Examples

Create a custom nonlinear model, and create a default fit options structure for the model:

f = fittype('a*x^2+b*exp(n*c*x)','problem','n');
options = fitoptions(f);

Set the Robust and Normalize properties of the fit options structure using property name/value pairs:

set(options,'Robust','LAR','Normalize','On')

Set the Display, Lower, and Algorithm properties of the fit options structure using cell arrays of property names/values:

set(opts,{'Disp','Low','Alg'},...
         {'Final',[0 0 0],'Levenberg'})

See Also

|

Was this topic helpful?