Constructor for sfit
object
surfacefit = sfit(fittype,coeff1,coeff2,...)
An sfit
object encapsulates the result of fitting a surface to
data. They are normally constructed by calling the fit
function, or interactively by exporting a fit from the Curve Fitting app to the
workspace. You can get and set coefficient properties of the sfit
object.
You can treat an sfit
object as a function to make predictions
or evaluate the surface at values of X and Y.
Like the cfit
class, sfit
inherits all
fittype
methods.
surfacefit = sfit(fittype,coeff1,coeff2,...)
constructs the sfit
object surfacefit
using
the model type specified by the fittype
object and the
coefficient values coeff1
, coeff2
, etc.
sfit
is called by the fit
function when fitting
fittype
objects to data. To create a
sfit
object that is the result of a regression, use
fit
.
You should only call sfit
directly if you want to
assign values to coefficients and problem parameters of a
fittype
object without
performing a fit.
Methods of sfit
objects:
argnames | Input argument names of cfit , sfit ,
or fittype object |
category | Category of fit of cfit , sfit , or
fittype object |
coeffnames | Coefficient names of cfit , sfit , or
fittype object |
coeffvalues | Coefficient values of cfit or sfit
object |
confint | Confidence intervals for fit coefficients of cfit or
sfit object |
dependnames | Dependent variable of cfit , sfit , or
fittype object |
differentiate | Differentiate cfit or sfit
object |
feval | Evaluate cfit , sfit , or
fittype object |
formula | Formula of cfit , sfit , or
fittype object |
indepnames | Independent variable of cfit , sfit , or
fittype object |
islinear | Determine if cfit , sfit , or
fittype object is linear |
numargs | Number of input arguments of cfit ,
sfit , or fittype object |
numcoeffs | Number of coefficients of cfit , sfit ,
or fittype object |
plot | Plot cfit or sfit object |
predint | Prediction intervals for cfit or sfit
object |
probnames | Problem-dependent parameter names of cfit ,
sfit , or fittype object |
probvalues | Problem-dependent parameter values of cfit or
sfit object |
quad2d | Numerically integrate sfit object |
setoptions | Set model fit options |
sfit | Constructor for sfit object |
type | Name of cfit , sfit , or
fittype object |
You can treat an sfit
object as a function to make predictions
or evaluate the surface at values of X and Y, e.g.,
x = 3 - 6 * rand( 49, 1 ); y = 3 - 6 * rand( 49, 1 ); z = peaks( x, y ); sf = fit( [x, y], z, 'poly32' ); zhat = sf( mean( x ), mean( y ) )