Fit exponential curve through data points in Matlab

前端 未结 5 2087
走了就别回头了
走了就别回头了 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 14:58

    cftool(X,Y) is the way to go. here's some linkage:

    LINK1 LINK2

    0 讨论(0)
  • 2021-01-06 15:06

    If by fit you mean least squares, you should try lsqcurvefit

    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2021-01-06 15:17

    Linearise, least squares, delinearise :-)

    0 讨论(0)
  • 2021-01-06 15:24

    Matlab has a function called polyfit. It can fit curve to a data which can be represented in the form a*X^n+b*X^(n-1)+.....z. However if you are sure that the data is of some exponential decay you can try taking logarithm of the data first and then using the polyfit function. I thing that will work.

    0 讨论(0)
提交回复
热议问题