%% Store an Impulse Response Function
% Specify 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)

%
% Store the impulse response function for 15 periods.

Y = impulse(Mdl,15)

% When you specify the number of observations, you know the length of the output impulse response series.
% Copyright 2015 The MathWorks, Inc.