Solver Stop Prematurely as new equation added
9 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi, How do I solve this? keep getting the solve stop prematurely. May I know what should I do? this happen when i try added another equation in my model. Any Suggestion? ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1718281/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1718281/image.jpeg)
1 Commento
Risposte (1)
Torsten
il 19 Giu 2024
Use an options structure for "fsolve" as
options = optimset('MaxFunEvals',100000,'MaxIter',100000)
sol = fsolve(...,options)
and try again.
2 Commenti
Torsten
il 19 Giu 2024
Modificato: Torsten
il 19 Giu 2024
The options
options = optimset('MaxFunEvals',100000,'MaxIter',100000)
give "fsolve" more iterations to converge (if the solver stops now prematurely, it should show that the Maximum Number of Iterations (10000) has been reached).
If this doesn't help and the problem came after inserting the new equation, you should think about why the new equation made your problem that more difficult or even unsolvable.
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!