fminunc not to stop even if it does not converge in one or more of 1000 replications of a simulation
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hi, I have a simulation of 1000 replications including two optimizations each using fminunc. In some of the cases, one of the optimizations does not converge and the code stops. I want to modify the code so that it continues even if it does not converge for some replications. How can I do this?
0 comentarios
Respuesta aceptada
Alan Weiss
el 3 de Jul. de 2013
I am not sure what you are asking. Do you want fminunc to continue to iterate even if it stopped without converging? If so, please let us see the exit message so we can understand why fminunc stopped. Also, you might get better advice if you show us your options and the call to fminunc.
If, however, you are looking for programming advice on how to handle conditions when a subroutine fails, then I think you simply need to unedrstand try/catch or other exception handling.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
Más respuestas (0)
Ver también
Categorías
Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!