www.gusucode.com > econ 案例源码程序 matlab代码 > econ/OptimizationOptionsExample.m

    %% Optimization Options
%% Specify the model
Mdl = arima('AR',0.5,'Constant',0,'Variance',1);
rng(1); % For reproducibility
y = simulate(Mdl,25);
%% Set the options
options = optimoptions(@fmincon,'Diagnostics','on',...
    'Algorithm','sqp','Display','off','ConstraintTolerance',1e-7)
% @fmincon is the function handle for fmincon
%% Estimate the model
ToEstMdl = arima(1,0,0);
EstMdl = estimate(ToEstMdl,y,'Options',options);