フィルターのクリア

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 Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by