How to include a fixed point in exponential fit?

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?

 Accepted 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.

More Answers (0)

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!