1

以下のようにfminconの標準出力を抑えたい

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.

<stopping criteria details>

Active inequalities (to within options.TolCon = 1e-06):
  lower      upper     ineqlin   ineqnonlin
    1          1                      
    2          2                      
    3          3                      
    4          4                      
    5          5                      
    6          6                      
    7          7      

これは、fmincon を使用して多変量関数の最小値を見つけるたびに起動されます。

    x0=lb; %guess
    A=[];
    b=[];
    Aeq=[];
    beq=[];

    global mlf1;
    mlf1=mlf;
    [x,fval]=fmincon(@HenriMLF.mlfEvalAtPoint,x0,A,b,Aeq,beq,lb,ub);

では、fmincon の stdout を抑制する方法は?

4

1 に答える 1

4

fmincon() を呼び出す前に、関数の適用方法を制御するさまざまなオプションを設定する必要があります。

あなたの場合、次のように「表示」を「オフ」に設定します。

options = optimoptions('Display', 'off');

したがって、あなたの場合、次のようなものが機能するはずです:

[x,fval]=fmincon(@HenriMLF.mlfEvalAtPoint,x0,A,b,Aeq,beq,lb,ub,options);

詳細なドキュメントはこちらです。

于 2013-11-26T02:48:33.960 に答える