Unverified Commit e576dc8c authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Block decomposition: fix evaluation of recursive variables in solved blocks

Ref. #1726
parent a69d598b
......@@ -92,9 +92,10 @@ for it_=start:incr:finish
g1=spalloc( Blck_size, Blck_size, nze);
while ~(cvg==1 || iter>maxit_)
if is_dynamic
[r, ~, T(:, it_), g1] = feval(fname, Block_Num, dynvars_from_endo_simul(y, it_, M), x, params, steady_state, T(:, it_), it_, false);
[r, yy, T(:, it_), g1] = feval(fname, Block_Num, dynvars_from_endo_simul(y, it_, M), x, params, steady_state, T(:, it_), it_, false);
y(:, it_) = yy(M.lead_lag_incidence(M.maximum_endo_lag+1,:));
else
[r, ~, T, g1] = feval(fname, Block_Num, y, x, params, T);
[r, y, T, g1] = feval(fname, Block_Num, y, x, params, T);
end
if ~isreal(r)
max_res=(-(max(max(abs(r))))^2)^0.5;
......
......@@ -83,7 +83,8 @@ while ~(cvg==1 || iter>maxit_)
r = NaN(Blck_size, periods);
g1a = spalloc(Blck_size*periods, Blck_size*periods, nze*periods);
for it_ = y_kmin+(1:periods)
[r(:, it_-y_kmin), ~, T(:, it_), g1]=feval(fname, Block_Num, dynvars_from_endo_simul(y, it_, M), x, params, steady_state, T(:, it_), it_, false);
[r(:, it_-y_kmin), yy, T(:, it_), g1]=feval(fname, Block_Num, dynvars_from_endo_simul(y, it_, M), x, params, steady_state, T(:, it_), it_, false);
y(:, it_) = yy(M.lead_lag_incidence(M.maximum_endo_lag+1,:));
if periods == 1
g1a = g1(:, Blck_size+(1:Blck_size));
elseif it_ == y_kmin+1
......
Subproject commit e4687bb97616a19432e1b46565b6b6065276b657
Subproject commit 4560639eb4035448cc8adc4535a1957fa82924ab
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment