Fixed wrong definition of a logical variable.

The second outputr returned by perfect_foresight_solver_core is the
max. abs. residual, not a dummy variable indicating success or failure
of the perfect foresight solver.
time-shift
Stéphane Adjemian(Charybdis) 2016-04-19 11:34:49 +02:00 committed by Stéphane Adjemian (Charybdis)
parent fbf2fae036
commit dabdda0506
1 changed files with 6 additions and 1 deletions

View File

@ -49,7 +49,12 @@ if flag
options.lmmcp = olmmcp;
options.solve_algo = solve_algo;
options.stack_solve_algo = stack_solve_algo;
[tmp,flag] = perfect_foresight_solver_core(M,options,oo);
[tmp, maxerror] = perfect_foresight_solver_core(M, options, oo);
if maxerror>options.dynatol.f
flag = false;
else
flag = true;
end
if ~flag && ~options.no_homotopy
exo_orig = oo.exo_simul;
endo_simul = repmat(steady_state,1,periods+1);