fminsearch - how to skip unstable parameter sets/solutions
Show older comments
I am optimizating a system of ordinary differential equations using mfinsearch.
I have to use a wide range of parameter values which means that some of them produce unstable solutions that cause the ode solver to run for a very long time or become unstable. Is there a way to detect this and halt these iterations, moving on to another set of parameters?
I have attempted to use custom stop function with the optimizer, but this causes the entire script to exit when I exceed the time limit. Is there a way to implement this e.g inside the objective function code to "skip" rather than exit?
Thanks for any help.
Accepted Answer
More Answers (0)
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!