필터 지우기
필터 지우기

How can I make an exponential fit with offset?

조회 수: 45 (최근 30일)
twig27
twig27 2017년 1월 26일
댓글: Star Strider 2018년 9월 24일
Hello, since Matlab does not provide a built-in exponential fit function with an offset I would like to create one by myself. I use the Curve Fitting Tool and enter as a custom equation: f(x) = a*exp(b*x)+c However the tool is not performing a correct fit. If I use the built-in exponential fit (2 terms) I obtain a smooth fit, where the time constant of the second term is set to zero and thereby creating the correct offset. Do I have to adjust the start values or why is the custom equation not yielding a good fit? Regards

답변 (2개)

Star Strider
Star Strider 2017년 1월 26일
The easy way is to create your own anonymous function:
f = @(b,x) b(1).*exp(b(2).*x) + b(3);
  댓글 수: 4
patrick
patrick 2018년 9월 24일
Thank you Star Strider!
Star Strider
Star Strider 2018년 9월 24일
@patrick —
My pleasure!

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2018년 9월 24일
You can use fitnlm() in the attached test.m file.

카테고리

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