Commit c309b0cf authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Fixed bug related to the initialization of the persistent variable.

parent c4cfd0c8
......@@ -126,26 +126,26 @@ function [fval,exit_flag,ys,trend_coeff,info,Model,DynareOptions,BayesInfo,Dynar
% AUTHOR(S) stephane DOT adjemian AT univ DASH lemans DOT FR
% Initialization of the returned variables and others...
fval = [];
ys = [];
trend_coeff = [];
exit_flag = 1;
info = 0;
% Declaration of the penalty as a persistent variable.
persistent penalty
% Initialization of the persistent variable.
if ~nargin || isempty(penalty)
penalty = 1e8;
return
if ~nargin, return, end
end
if nargin==1
penalty = xparam1;
return
end
% Initialization of the returned variables and others...
fval = [];
ys = [];
trend_coeff = [];
exit_flag = 1;
info = 0;
% Set flag related to analytical derivatives.
if nargout > 9
analytic_derivation=1;
......
Markdown is supported
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