Skip to content
Snippets Groups Projects
Commit 1626b0aa authored by Stéphane Adjemian (Charybdis)'s avatar Stéphane Adjemian (Charybdis)
Browse files

Added specialized code for purely forward models.

parent 771b4e76
No related branches found
Tags
No related merge requests found
......@@ -71,13 +71,15 @@ else
k2 = k2(:,1)+(M_.maximum_lag+1-k2(:,2))*M_.endo_nbr;
switch iorder
case 1
if isempty(dr.ghu)
if isempty(dr.ghu)% For (linearized) deterministic models.
for i = 2:iter+M_.maximum_lag
yhat = y_(dr.order_var(k2),i-1);
y_(dr.order_var,i) = dr.ghx*yhat;
end
elseif isempty(dr.ghx)% For (linearized) purely forward variables (no state variables).
y_(dr.order_var,:) = dr.ghu*transpose(ex_);
else
epsilon = dr.ghu*transpose(ex_); clear('ex_');
epsilon = dr.ghu*transpose(ex_);
for i = 2:iter+M_.maximum_lag
yhat = y_(dr.order_var(k2),i-1);
y_(dr.order_var,i) = dr.ghx*yhat + epsilon(:,i-1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment