MATLAB: Curve classification with interference/disturbance

classificationcurve fittingMATLAB

Hi
Is there a method to classify how much interference/disturbance there is in the signal (black lines)?
The red line is the exponetial fit. If the curve follows the red line, one would say that it has no disturbance

Best Answer

One option is to evaluate the exponential curve at exactly the same values of the independent variable as the data (that I assume are the black curve), then use trapz to integrate either the difference or the squared difference in the region-of-interest. That would give you the integral of the error or the squared error.
There may be other ways as well, since I am not certain what result you want.