%% Specify ARMAX Model Using Dot Notation
% This example shows how to specify a stationary ARMAX model using arima.
% Specify the ARMAX(2,1) model
% {y_t} = 6 + 0.2{y_{t - 1}} - 0.3{y_{t - 2}} + 3{x_t} + {\varepsilon _t} + 0.1{\varepsilon _{t - 1}}
% by including one stationary exogenous covariate in arima.

 Mdl = arima('AR',[0.2 -0.3],'MA',0.1,'Constant',6,'Beta',3)

% The output shows the model Mdl has NaN values or an empty cell ({}) for the Variance, SAR, and SMA properties. You can modify the model using dot notation at the command line. For example, you can introduce another exogenous, stationary covariate, and specify the variance of the innovations as 0.1
% {y_t} = 6 + 0.2{y_{t - 1}} - 0.3{y_{t - 2}} + x_t^\prime \left[ {\begin{array}{*{20}{c}}3\\{ - 2}\end{array}} \right] + {\varepsilon _t} + 0.1{\varepsilon _{t - 1}};\;\;{\varepsilon _t}\sim N(0,0.1).
%
% Modify the model by specifying an innovations variance of 0.1 and regression coefficient values.

Mdl.Beta = [3 -2];
Mdl.Variance = 0.1;
Mdl

% Copyright 2015 The MathWorks, Inc.