User`s guide

feval
4-100
4feval
Purpose Evaluate a fit result object or a fit type object
Syntax f = feval(fresult,x)
f = feval(ftype,coef1,coef2,...,x)
Arguments
Description
f = feval(fresult,x) evaluates the fit result object fresult at the values
specified by
x, and returns the result to f. You create a fit result object with the
fit function.
f = feval(ftype,coef1,coef2,...,x) evaluates the fit type object ftype
using the coefficients specified by
coef1, coef2, and so on. You create a fit type
object with the
fittype function.
Remarks You can also evaluate a fit result or a fit type object using the following syntax.
f = fresult(x);
f = ftype(coef1,coef2,...,x);
Example Create a fit type object and evaluate the object at x using the specified model
coefficients.
x = (0:0.1:10)';
ftype = fittype('a*x^2+b*x');
f = feval(ftype,1,2,x);
fresult
A fit result object.
x A column vector of values at which fresult or ftype is
evaluated.
ftype A fit type object.
coef1,coef2,... The model coefficients assigned to ftype.
f A column vector containing the result of evaluating
fresult or ftype at x.