How to find parameters of implicit function?
조회 수: 1 (최근 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에서 Least Squares에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!