Effacer les filtres
Effacer les filtres

How to find parameters of implicit function?

1 vue (au cours des 30 derniers jours)
Jernej
Jernej le 18 Juin 2014
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?

Réponses (0)

Catégories

En savoir plus sur Least Squares dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by