% Initialization of the returned argument. Each will be a dseries object containing the IRFS for the endogenous variables listed in the third input argument.
irfs=struct();
% Get the covariance matrix of the shocks.
Sigma=M_.Sigma_e+1e-14*eye(M_.exo_nbr);
sigma=transpose(chol(Sigma));
% Compute the IRFs (loop over innovations).
fori=1:length(listofshocks)
innovations=zeros(periods,DynareModel.exo_nbr);
% Get transition paths induced by the initial condition.