FUNCTION REFERENCE

fitoptions

Create or change the options of a curve or surface fit.

Create or change the options of a curve or surface fit.

Syntax

opts = fitoptions(libraryModelName or fittype)

Syntax

opts = fitoptions('Method', methodName, Name, Value, ...)

Syntax

opts = fitoptions(opts, Name, Value, ...)

Methods are NonlinearLeastSquares, LinearLeastSquares, LinearInterpolant, NearestInterpolant, PchipInterpolant, CubicSplineInterpolant, SmoothingSpline and None. Every method has Normalize, Exclude, Weights and Method; SmoothingSpline adds SmoothingParam ([] = the data-dependent default); least-squares methods add Robust, Lower and Upper; NonlinearLeastSquares adds StartPoint, Algorithm, DiffMinChange, DiffMaxChange, Display, MaxFunEvals, MaxIter, TolFun and TolX. Library models fill in their default bounds (Gaussian widths and sine frequencies are nonnegative). Pass the options to fit as fit(x, y, fitType, opts); opts.Lower = [...] changes a field.

Example

opts = fitoptions('gauss1'); opts.Lower

Example

opts = fitoptions('Method', 'NonlinearLeastSquares', 'StartPoint', [1 1]); opts.StartPoint

Differences from MATLAB: the options are a struct value (class struct) with the method's fields; option names in calls are matched case-insensitively, also by unique prefix.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.