Skip to content
Snippets Groups Projects
Verified Commit 0839ff78 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

:bug: sim1_lbj.m: use options_.dynatol.x and not options_.dynatol.f for terminal condition

The maximum error is computed over the change in endogenous (i.e. ΔY).
parent 4bee919c
No related branches found
No related tags found
No related merge requests found
......@@ -4,8 +4,13 @@ function [endogenousvariables, success, err, iter] = sim1_lbj(endogenousvariable
%
% INPUTS
% ...
%
% OUTPUTS
% ...
% endogenousvariables [matrix] All endogenous variables of the model
% success [logical] Whether a solution was found
% err [double] ∞-norm of Δendogenousvariables
% iter [integer] Number of iterations
%
% ALGORITHM
% Laffargue, Boucekkine, Juillard (LBJ)
% see Juillard (1996) Dynare: A program for the resolution and
......@@ -96,7 +101,7 @@ for iter = 1:options_.simul.maxit
if verbose
fprintf('Iter: %s,\t err. = %s, \t time = %s\n', num2str(iter), num2str(err), num2str(etime(clock, h2)));
end
if err < options_.dynatol.f
if err < options_.dynatol.x
success = true; % Convergency obtained.
break
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment