Exponential fit by customised equation

1 次查看(过去 30 天)
When I am fiiting my experimental data clicking exponetial fit, then it fits well. But when I am writing the same equation in customised form its not fitting.
  2 个评论
Walter Roberson
Walter Roberson 2019-11-1
Is it a sum of exponential terms, or a single exponential?
Sushreesmita Mishra
my values to fit
x = [0 120 240 360 480 600 720 840 960 1080 1200 1320 1440 1560 1680 1800]
y = [1 0.861137 0.747681 0.664806 0.562721 0.485829 0.411907 0.356567 0.272409 0.199405 0.125686 0.100692 0.040232 0.019759 4.32E-05 2.7E-06]
In custom equation section of curve fitting tool the equation with form
a*exp(-b*x)
for y = f(x) returns a poor fit with negative R2 value which is illogical.
On the other hand, inbuilt exponential tool with same form returns a very good fit with R2 = 0.96
My question is that why this difference is seen with same form, i.e. "a*exp(-b*x)", and is the custom equation tool trustable for other forms?

请先登录,再进行评论。

采纳的回答

Alex Sha
Alex Sha 2019-11-1
Hi, Sushreesmita Mishra, the problem you met is normal. When chose build-in function for data fitting, since "build-in", so Matlab itself know which function user selected, then it can chose proper initial start-value acording to the type of function and the data, in the otherhand, for fitting function customised, Matlab doesn't know the type of the function, thus the initial start-values can not be given properly, it lead to the poor fit as your meeting. Same situation in other packages like OriginPro.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by