cannot stop fmincon displaying text output
17 次查看(过去 30 天)
显示 更早的评论
I cannot seem to stop fmincon displaying text information in the command window even though I have set the display options to 'none' or 'off'
opt = optimset('Display','off', 'Algorithm', 'active-set' );
[ specSens( :, k ),~, ~,~ ] = fmincon(@objfunCor, x0, [ ], [ ], [ ], [ ], lb ,ub , [], opt, fTerm, sTerm, yTerm);
e.g.
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.
<stopping criteria details>
No active inequalities.
---------------------------------------------------------------------------------------------
MATLAB Version: 8.5.0.197613 (R2015a)
MATLAB License Number: •••••
Operating System: Microsoft Windows 7 Professional Version 6.1 (Build 7601: Service Pack 1)
Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) Client VM mixed mode
2 个评论
Alan Weiss
2016-2-12
Are you sure that your value of opt is being passed to fmincon? I mean, you just gave us a code snippet, and I imagine that you have many other lines of code. I just want to make sure that opt is what you think it is when you call fmincon.
Also, I suggest that you use optimoptions for setting your options.
Alan Weiss
MATLAB mathematical toolbox documentation
回答(1 个)
Walter Roberson
2016-2-12
Passing any parameter after the options has undefined effect. It could do something like trigger the playing of Anchors Away on the line printer.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!