How to find parameters of implicit function?
2 ビュー (過去 30 日間)
古いコメントを表示
I have to find parameters a and b of this implicit function y=1614413.7*(coth((x+b*y)/a)-a/(x+b*y)).
This function best describes my data. So far I have written this code:
function y=deviskaF(x,p)
y=zeros(size(x)); NN=length(x); opt=optimset('display','off');
for i=1:NN y(i)=fsolve(@(y) y-1.5e6*(coth((x(i)+p(2)*y)./p(1))-(p(1)./(x(i)+p(2)*y))), .1, opt); end end
Then I call this function in lsqcurvefit in matlab command window.
lsqcurvefit(@(params, xdata) deviskaF(xdata,params),[10 1e-6], x, y)
Parameter a should be somewere around 10 and parameter B around 10^-6. The results are far away from predicted results and I also get this message:
Local minimum possible.
lsqcurvefit stopped because the size of the current step is less than the default value of the step size tolerance.
What am I doing wrong?
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Web Services についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!