- sometimes there just are no real-valued solutions
- sometimes you need to narrow down the search range by using tighter upper and lower bounds
- sometimes it can help a lot to use the solution from the previous iteration as the initial value for the current iteration
- if it is low enough dimension, graph to see if there are plausible solutions
- sometimes switching to symbolic toolbox helps, especially if there are fairly large or fairly small intermediate values. But note that when you use vpasolve() if the next iteration would be projected to be outside the bounds, then vpasolve() might just give up instead of adjusting the guess to be within the bounds
- sometimes adjusting the tolerence can help
What can be done if fsolve cannot find solution?
7 次查看(过去 30 天)
显示 更早的评论
Hello
I have a large piece of code where I have a loop. In each iteration of the loop I use fsolve to find the solution of relatively large nonlinear system. At some points, fsolve returns
No solution found.
fsolve stopped because the relative size of the current step is less than the
value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the value of the function tolerance.
I have a conditon that uses the exitflag to stop if a solution is not found. However, I don't know what can be done to maybe try resolve the system. I tried changing the initial guess and the alogorithm but no luck. Is there anything that could be done in this case?
0 个评论
采纳的回答
Walter Roberson
2022-7-20
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!