MATLAB: How to extract the function from curve fitting tool in Matlab

curve fittinginterpolationMATLABnumerical integration

I want to extract the function for my data points. I used interpolant witg linear method as indicated in the figure below.
Is it possible to extract a function for the new curve produced by curve fitting as i want to integrate the equation to get the area under the curve?

Best Answer

You can call integrate on the cfit object. See the documentation page for more information.