%% MA Model with Nonconsecutive Lags
% This example shows how to specify an MA(q) model with nonzero coefficients at nonconsecutive lags.
% Specify an MA(4) model with nonzero MA coefficients at lags 1 and 4 (an no constant term),
% {y_t} = {\varepsilon _t} + {\theta _1}{\varepsilon _{t - 1}} + {\theta _{12}}{\varepsilon _{t - 12}},
% where the innovation distribution is Gaussian with constant variance.

Mdl = arima('MALags',[1,4],'Constant',0)

% The output shows the nonzero AR coefficients at lags 1 and 4, as specified. The property Q is equal to 4, the number of presample innovations needed to initialize the MA model. The unconstrained parameters are equal to NaN.
%
% Display the value of MA:

Mdl.MA

% The MA cell array returns four elements. The first and last elements (corresponding to lags 1 and 4) have value NaN, indicating these coefficients are nonzero and need to be estimated or otherwise specified by the user. arima sets the coefficients at interim lags equal to zero to maintain consistency with MATLAB® cell array indexing.
% Copyright 2015 The MathWorks, Inc.