Solving equation by lsqnonlin function gives warning in MATLAB

I'm given data for x,y, and z. I am trying to fit a set of data into a model of functional form as described below:
z(x,y) = c1 + c2.* exp(-(c3 .* x)) + c4.* (y.^1);
where c1, c2, c3, c4 are the coefficients to be found.
I tried to use lsqnonlin function but I am getting the message as
lsqnonlin stopped because the final change in the sum of squares relative to its initial value is less than the default value of the function tolerance.
I have following data e.g
% Here x,y are independent variables and z is dependent variable
x= [1 .. 12];
y= [0.001 .. 0.7];
z= [0.996474846 .. 0.432743332];
model = @(c) c(1) + c(2)*exp(-c(3)*x) + c(4)*y - z;
C = lsqnonlin(model, [1 1 1 1])
Why I am getting this message? Any advice.
Thankyou in advance

3 件のコメント

Walter Roberson
Walter Roberson 2013 年 11 月 21 日
Considering that it is working numerically, what conditions are you expecting will make it decide to stop, and what message are you expecting it will give when it encounters those conditions ?
Syeda
Syeda 2013 年 11 月 21 日
I just want to get four co-efficients. I want to fit a set of data into a model. But, this message confused me!
Syeda
Syeda 2013 年 11 月 21 日
I just want to get an equation by using these co-efficients

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

回答 (0 件)

カテゴリ

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

質問済み:

2013 年 11 月 21 日

編集済み:

2013 年 11 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by