Help Fit line / curve to data
1 次查看(过去 30 天)
显示 更早的评论
Hello, I am trying to find the equation of a best fit line for this data that I have below. I tried using polynomial fit with degree 2 but the results are unsatisfactory. I was wondering if anyone can offer any suggestions. Based on the scatter plot below, id like the results to be a curve that is steep at a steep slope at the beginning and gentle later.
回答(2 个)
Walter Roberson
2016-11-23
I suggest trying to fit it to y = A * exp(-B*x) + C
If you assume that C is 0 then that would be a fit of y = A * exp(-B*x) which would be
log(y) = log(A) - B * x
which would be a linear fit to find B and log(A).
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!