fsolve function working at times but failing sometimes! Warning on non-square systems!
2 views (last 30 days)
Show older comments
Hello, Would somebody please explain to me why is that I sometimes get the following warning:
" Trust-region-dogleg algorithm of FSOLVE cannot handle non-square systems; using Levenberg-Marquardt algorithm instead. "
I get an answer many other times without getting this warning, but 'sometimes' I get NaN as an answer along with this warning! This is while the code is exactly the same each time.
I am solving two non-linear equations in my program each time. This warning is related to fsolve function I use for solving those equations. Why is that this function sometimes fails but works the other times without any change in the code?!?
I would be grateful if somebody explain this to me as it makes my program very unreliable.
Thank you. Atekeh
6 Comments
Matt J
on 13 Nov 2013
Without seeing your code, we cannot know. Maybe you have rand()-driven lines somewhere...
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!