Fit exponential curve through data points in Matlab

前端 未结 5 2114
走了就别回头了
走了就别回头了 2021-01-06 14:43

Having data of an exponential decay available, I would like to fit a curve through it. How can I do that in Matlab?

5条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-06 15:12

    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.

提交回复
热议问题