How to disable fmincon from output notices?

18 vues (au cours des 30 derniers jours)
Xianwen
Xianwen le 25 Jan 2012
Commenté : Rahul Bhadani le 15 Sep 2020
Hi!
I'm using fmincon to solve optimization problems. And I don't particularly want fmincon to tell me that:
_Local minimum possible. Constraints satisfied.
fmincon stopped because the predicted change in the objective function is less than the default value of the function tolerance and constraints are satisfied to within the default value of the constraint tolerance.
No active inequalities. _
It is quite annoying when I'm using fmincon in every iteration of a loop. Can this output be disabled? I read through fmincon's on-line documentation but didn't find an option for that purpose.
Xianwen

Réponse acceptée

Oleg Komarov
Oleg Komarov le 25 Jan 2012
  6 commentaires
Steven Lord
Steven Lord le 1 Sep 2020
From the documentation page: "x = fmincon(fun,x0,A,b,Aeq,beq,lb,ub,nonlcon,options) minimizes with the optimization options specified in options. Use optimoptions to set these options. If there are no nonlinear inequality or equality constraints, set nonlcon = []."
You have to specify nonlcon if you want to specify options since the inputs must be in a fixed order. But you can specify it as [] to tell fmincon you don't have any nonlinear constraints.
Rahul Bhadani
Rahul Bhadani le 15 Sep 2020
Ah, thank you. It worked.

Connectez-vous pour commenter.

Plus de réponses (0)

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by