Having data of an exponential decay available, I would like to fit a curve through it. How can I do that in Matlab?
Try this:
ft=fittype('exp1');
cf=fit(time,data,ft)
This is when time and data are your data vectors; time is the independent variable and data is the dependent variable.
This will give you the coefficients of the exponential decay curve.
If by fit you mean least squares, you should try lsqcurvefit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With