%% Specify GARCH Model with Nonconsecutive Lags
% This example shows how to specify a GARCH model with nonzero coefficients at nonconsecutive lags.
% Specify a GARCH(3,1) model with nonzero GARCH coefficients at lags 1 and 3. Include a mean offset.

Mdl = garch('Offset',NaN,'GARCHLags',[1,3],'ARCHLags',1)

% The unknown nonzero GARCH coefficients correspond to lagged variances at lags 1 and 3. The output shows only nonzero coefficients.
%
% Display the value of GARCH.

Mdl.GARCH

% The GARCH cell array returns three elements. The first and third elements have value NaN, indicating these coefficients are nonzero and need to be estimated or otherwise specified. By default, garch sets the interim coefficient at lag 2 equal to zero to maintain consistency with MATLAB® cell array indexing.
% Copyright 2015 The MathWorks, Inc.