Curve Fitting Toolbox    
integrate

Integrate a fit result object

Syntax

Arguments

fresult
A fit result object.
x
The values at which fresult is integrated.
x0
The integration starting point.
inty
A vector of integration values.

Description

inty = integrate(fresult,x,x0) integrates the fit result object fresult at the values specified by x starting from x0, and returns the result to inty. The fresult object is a fit result object generated by the fit function. x is a scalar or column vector and inty is the same size as x. x0 is a scalar.

Example

Create a noisy sine wave on the interval [-2, 2].

Create a custom fit type, and fit the data using reasonable starting values.

Calculate the integral for each value of x starting at -2*pi

See Also

differentiate, cfit, fit, quad


  get plot