%% Return IRF of Known ARMA(1,1) Model
% Create the ARMA(1,1) model
% {y_t} = 0.7{y_{t - 1}} + {\varepsilon _t} + 0.2{\varepsilon _{t - 1}}.

Mdl = arima('AR',0.7,'MA',0.2,'Constant',0);

% Return the IRF for 15 periods.

numObs = 15;
periods = 0:(numObs-1);
y = impulse(Mdl,numObs);
irf = table(periods',y,'VariableNames',["Period" "y"])

% y(0), which is the dynamic response of the system at the time impulse shocks the innovation, is 1.
% Copyright 2020 The MathWorks, Inc.