Exponential fit by customised equation

조회 수: 1 (최근 30일)
Sushreesmita Mishra
Sushreesmita Mishra 2019년 11월 1일
댓글: Sushreesmita Mishra 2019년 11월 1일
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
Sushreesmita Mishra 2019년 11월 1일
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에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by