避免 Matlab 估计函数在命令上打印 windows

Avoid Matlab estimate function to print on command windows

你好我有这个脚本

load Data_GlobalIdx1                             % Import daily index closings

nIndices = size(Data,2);                         % # of indices
weights  = repmat(1/nIndices, nIndices, 1);      % Equally weighted portfolio
returns = price2ret(Data,[],'Periodic') * weights;   % Arithmetic returns
returns = log(1 + returns);                          % Logarithmic returns
T       = size(returns, 1);                          % Historical sample size
model   = arima('AR', NaN, 'Distribution', 't', 'Variance', egarch(1,1));
options = optimset('fmincon');
options = optimset(options, 'Display'  , 'off', 'Diagnostics', 'off', ...
                        'Algorithm', 'sqp', 'TolCon'     , 1e-7);

fit = estimate(model, returns, 'options', options);  % Fit the model

当我在命令 windows 上启动最后一个函数 MATLAB 打印 ARMA/GARCH 的结果时。我不想要那个。谁能建议我如何阻止它?下面是打印内容的示例:

ARIMA(1,0,0) Model:
--------------------
Conditional Probability Distribution: t

                              Standard          t     
 Parameter       Value          Error       Statistic 
-----------   -----------   ------------   -----------
 Constant    0.000213763   0.000124705        1.71414
    AR{1}       0.185495     0.0199051        9.31898
      DoF        12.6492        2.7037        4.67846


EGARCH(1,1) Conditional Variance Model:
--------------------------------------
Conditional Probability Distribution: t

                              Standard          t     
 Parameter       Value          Error       Statistic 
-----------   -----------   ------------   -----------
 Constant      -0.133661      0.030071       -4.44486
 GARCH{1}       0.986387    0.00309071        319.146
 ARCH{1}        0.133832     0.0190058        7.04166
 Leverage{1}   -0.091885     0.0121515       -7.56164
 DoF             12.6492        2.7037        4.67846

谢谢

您可以使用 'Display' parameter 静音或修改在执行期间打印到命令行的输出量和类型。

estimate(model, returns, 'options', options, 'Display', 'off')