Lsqnonlin failure optimization Global Local

1 次查看(过去 30 天)
Hi world,
I have the following error using lsqnonlin to fo an optimization. I am running 5 optim in a for loop to fit as close as my objective function. At one step the solver return the following error while the previous optimizations where fine. The last step before the error was pretty close to the expectation I would expect the solver to get out without error.
Failure to solve for root in analytic expression.
My objective function is as a square of a relative difference ie (x-m)./m)^2 the solver's options are as follow: options = optimset('disp','iter','MaxFunEvals',1000,'TolX',1e-8,'TolFun',1e-5,'Algorithm','trust-region-reflective','UseParallel','always');
Can I kindly ask you how to hand over this issue?
Regards,

回答(1 个)

Alan Weiss
Alan Weiss 2016-3-16
It sounds like the error is coming from your objective function. Can you show us your objective, please?
Alan Weiss
MATLAB mathematical toolbox documentation

类别

Help CenterFile 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!

Translated by