Remove help message from quadprog() function

Someone knows how I remove the help message when the quadprog function is used?
The message is:
"Solution found during presolve.
Some combination of the bounds, linear constraints, and linear terms in the objective function immediately lead to the solution.
Minimum found that satisfies the constraints.
Optimization completed because the objective function is non-decreasing in feasible directions, to within the default value of the function tolerance, and constraints are satisfied to within the default value of the constraint tolerance.
Thanks

回答 (1 件)

jgg
jgg 2016 年 1 月 21 日
編集済み: jgg 2016 年 1 月 21 日

1 投票

You can call it like this:
options = optimoptions('Display','off');
x = quadprog(H,f,A,b,Aeq,beq,lb,ub,x0,options);
This should disable the output when the solver completes.

3 件のコメント

Roberto Menezes
Roberto Menezes 2016 年 1 月 22 日
Thanks, but it doesn't work. I've put that. It is a kind of help message (blue color, for default), according the Matlab.
This is a sample of the code:
H=[0.0388,0;0,0.1157];
f=[78.5000;95.6400];
A=[1,0;-1,0;0,1;0,-1];
b=[400; -100; 200; -50];
Aeq=[1,1];
beq=300;
lb=[];
ub=[];
x0=[];
[x,fval,exitflag,output,lambda]= quadprog(H,f,A,b,Aeq,beq,lb,ub,x0,'Algorithm','interior-point-convex','Display','off');
jgg
jgg 2016 年 1 月 22 日
編集済み: jgg 2016 年 1 月 22 日
You're not calling an options object:
H=[0.0388,0;0,0.1157];
f=[78.5000;95.6400];
A=[1,0;-1,0;0,1;0,-1];
b=[400; -100; 200; -50];
Aeq=[1,1];
beq=300;
lb=[];
ub=[];
x0=[];
options = optimset('Display', 'off');
[x,fval,exitflag,output,lambda]= quadprog(H,f,A,b,Aeq,beq,lb,ub,x0,options);
This code evaluates for me just fine without any message or warning being displayed.
Viktor Möllerstedt
Viktor Möllerstedt 2018 年 12 月 12 日
編集済み: Viktor Möllerstedt 2018 年 12 月 12 日
I know this post is old by now, but
options = optimoptions('Display','off');
produces an error. As you have commented further down, jgg, the correct call is:
options = optimset('Display', 'off');
This works like a charm!

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeQuadratic Programming and Cone Programming についてさらに検索

タグ

質問済み:

2016 年 1 月 21 日

編集済み:

2018 年 12 月 12 日

Community Treasure Hunt

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

Start Hunting!

Translated by