Problem using FSOLVE 'OptimalityTolerance' is not an option
Afficher commentaires plus anciens
Hi
I'm trying to do Nonlinear regression with Levenberg Marquardt, but I have this problem.
Error using optimoptions (line 105)
'OptimalityTolerance' is not an option for FSOLVE.
A list of options can be found on the FSOLVE documentation page.
Error in Transfer_function_corrected (line 116)
options =
optimoptions(@fsolve,'TolFun',1e-54,'Algorithm','levenberg-marquardt','MaxIter',1e16,'Display','off','TolFun',1e-12,'OptimalityTolerance',1e-12);
My code..
[l,a]=size(H);
for y=1:a
for z=1:l
myfun = @(x) [((H(z,y)-(D(y)*exp(-1i*x(1)*(r(y+1)-r(1))))))^2];
options = optimoptions(@fsolve,'TolFun',1e-54,'Algorithm','levenberg-marquardt','MaxIter',1e16,'Display','off','TolFun',1e-12,'OptimalityTolerance',1e-12);
[K(z,y),fval(z,y)] = fsolve(myfun, [0],options);
c=c+1;
waitbar(c/n)
end
end
Thank you so much.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Solver Outputs and Iterative Display dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!