How can I stop Fmincon?

Hi all,
How can I stop the fmincon if the cost function tracks a certian value?

Answers (1)

Walter Roberson
Walter Roberson on 22 Mar 2025

0 votes

Use an OutputFcn and set the "stop" output according to whether you want to stop or not. https://www.mathworks.com/help/optim/ug/output-function.html#f11675

Categories

Find more on Programming in Help Center and File Exchange

Asked:

on 22 Mar 2025

Answered:

on 22 Mar 2025

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!