user defined equation fit to a dat a set

I have x axis values=x
y axis values=y
and equation of line to be fit on the plot of data is suppose
d=a*exp(x^b - 2^b)
where a and b i have to find...
so please help me out with this problem

 採用された回答

AJ von Alt
AJ von Alt 2014 年 1 月 22 日

1 投票

The fit function can use custom non-linear models. The custom nonlinear models article gives an example of how to do this from the command line.
For your model it would be:
f = fit( x , y ,'a*exp(x^b-2^b)')

1 件のコメント

aditi
aditi 2014 年 1 月 23 日
hey von
I tried using it...but i am getting 'a' value suppose 1 which actually should come 5 and am getting 'b' value suppose 1...it should actually be 2...
so m getting very less values than the correct one...

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGet Started with Curve Fitting Toolbox についてさらに検索

質問済み:

2014 年 1 月 22 日

コメント済み:

2014 年 1 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by