%% MA Model with No Constant Term
% This example shows how to specify an MA(q) model with constant term equal to zero. Use name-value syntax to specify a model that differs from the default model.
% Specify an MA(2) model with no constant term,
% {y_t} = {\varepsilon _t} + {\theta _1}{\varepsilon _{t - 1}} + {\theta _2}{\varepsilon _{t - 2}},
% where the innovation distribution is Gaussian with constant variance.

Mdl = arima('MALags',1:2,'Constant',0)

% The MALags name-value argument specifies the lags corresponding to nonzero MA coefficients. The property Constant in the created model object is equal to 0, as specified. The model object has default values for all other properties, including NaN values as placeholders for the unknown parameters: the MA coefficients and scalar variance.
% You can modify the created model variable, or input it (along with data) to estimate.
% Copyright 2015 The MathWorks, Inc.