Problem using FSOLVE 'OptimalityTolerance' is not an option
이전 댓글 표시
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.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!