User`s guide

fittype
4-114
ftype = fittype('expr','PropertyName',PropertyValue,...) creates a fit
type object using the specified property name/property value pairs. The
supported property names are given below.
Example Create a fit type object for a custom general equation and define the
problem-dependent name to be
n.
ftype = fittype('a*x+b*exp(n*x)','problem','n');
Define the independent variable to be chan.
ftype = fittype('a*chan+b*exp(n*chan)','ind','chan','prob','n')
ftype =
General model:
ftype(a,b,n,chan) = a*chan+b*exp(n*chan)
Create a fit type object for a custom linear equation and specify names for the
coefficients.
ftype = fittype({'cos(x)','1'},'coeff',{'a1','a2'})
ftype =
Linear model:
ftype(a1,a2,x) = a1*cos(x) + a2
Property Name Description
coefficients
Specify the coefficient names. Use a cell array if there
are multiple names.
dependent Specify the dependent (response) variable name.
independent Specify the independent (predictor) variable name.
options Specify the default fit options for the current expression.
problem Specify the problem-dependent (constant) names. Use a
cell array if there are multiple names.