MATLAB: How to include a fixed point in exponential fit

exponential fitinclude

I am trying to fit my data with fit(x,y, 'exp1') function to get the attenuation of the signal. The first point of my data is crucial and should always be included in the fit. Is there a solution to define this point to be always included during the fit?

Best Answer

You can approximate this by using the 'weights' input parameter to fit. Give the first point much higher weight than any of the others, and that point should be fit almost exactly.