Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
c309b0cf
Commit
c309b0cf
authored
Sep 21, 2011
by
Stéphane Adjemian
Browse files
Fixed bug related to the initialization of the persistent variable.
parent
c4cfd0c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/DsgeLikelihood.m
View file @
c309b0cf
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment