How to fit this eqation:y=a-b+*c^x ?

3 ビュー (過去 30 日間)
afrya
afrya 2013 年 12 月 13 日
コメント済み: Image Analyst 2013 年 12 月 13 日
Hi,
I am wondering how can I fit the following equation: y=a-b+*c^x since it is not included in the library and how can I exclude some point without using the curve fitting toolbox. When I use the following expression,I receive an error message
g = fittype('a-b*c^x','coeff',{'a','b','c'})
[curve2,gof2] = fit(y2,Av,g)
Thank you in advance
  6 件のコメント
afrya
afrya 2013 年 12 月 13 日
a, b, and c are all coefficients
Image Analyst
Image Analyst 2013 年 12 月 13 日
Looking more closely I think that you meant b to be a multiplicative factor, not a scalar that you subtract and that you just made a mistake when you wrote "y=a-b+*c^x". Because of what Roger said, and you said later, I think what you really meant was y=a-b*c^x and you just put in the + sign by mistake.

サインインしてコメントする。

回答 (1 件)

Roger Stafford
Roger Stafford 2013 年 12 月 13 日
Instead of 'a-b*c^x' you might try the equivalent 'a-b*exp(k*x)'. If you can fit to that, then c = exp(k) will be a fit for 'a-b*c^x'.

カテゴリ

Help Center および File ExchangeGet 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