필터 지우기
필터 지우기

fmincon displays huge unwanted output text

조회 수: 1 (최근 30일)
Michael
Michael 2012년 11월 23일
Hi. Does anyone know why fmincon would ignore a 'Display','off' setting in the options? Here is my code:
opt = optimset('MaxFunEvals',200000,'Display','off');
... more code ....
opt = optimset('Algorithm','active-set');
f = @(xx)xfunc(xx,A,b,l,L);
[x2] = fmincon(f,zeros(256,1),[],[],[],[],zeros(256,1),Inf,[],opt);
In the output it still tells me:
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>
Active inequalities (to within options.TolCon = 1e-006):
lower upper ineqlin ineqnonlin
1
2
3
4
...
And this goes on up to 256, using up a huge number of lines. I'm pretty sure I've specified the display off correctly using the optimset function. The code itself is minimising f subject to every variable being non-negative, if this is relevant.
Does the second optimset affect the first perhaps?
Thanks for any suggestions.

채택된 답변

Matt J
Matt J 2012년 11월 23일
편집: Matt J 2012년 11월 23일
Yes, the 2nd optimset completely overwrites the first. Do this instead
opt = optimset(opt, 'Algorithm','active-set');
  댓글 수: 1
Michael
Michael 2012년 11월 23일
great, thanks. I assumed it could be added to rather than overwritten.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by