From 9bdf75a52c6c103e323d0d3c681e6874f11bbe80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= <stephane.adjemian@univ-lemans.fr> Date: Sat, 21 Feb 2015 13:56:11 +0100 Subject: [PATCH] Fixed bug in the initialization of the homotopy for perfect foresight models. --- matlab/perfect-foresight-models/perfect_foresight_solver.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matlab/perfect-foresight-models/perfect_foresight_solver.m b/matlab/perfect-foresight-models/perfect_foresight_solver.m index 580fb6a77e..7e28000ad5 100644 --- a/matlab/perfect-foresight-models/perfect_foresight_solver.m +++ b/matlab/perfect-foresight-models/perfect_foresight_solver.m @@ -111,7 +111,7 @@ if ~oo_.deterministic_simulation.status && ~options_.no_homotopy path_with_nans = any(any(isnan(oo_.endo_simul))); path_with_cplx = any(any(~isreal(oo_.endo_simul))); - if isequal(iteration,1) && (path_with_nans || path_with_cplx) + if isequal(iteration,1) oo_.endo_simul(:,M_.maximum_lag+1:end-M_.maximum_lead) = endoinit(:,1:options_.periods); elseif path_with_nans || path_with_cplx oo_.endo_simul(:,M_.maximum_lag+1:end-M_.maximum_lead) = saved_endo_simul(:,1+M_.maximum_endo_lag:end-M_.maximum_endo_lead); -- GitLab