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
cee82819
Commit
cee82819
authored
Aug 18, 2011
by
MichelJuillard
Browse files
changed test for NaN and Inf in Jacobian, changed info error number, changed error message
parent
f6f61df1
Changes
2
Hide whitespace changes
Inline
Side-by-side
matlab/dr1.m
View file @
cee82819
...
...
@@ -99,7 +99,7 @@ if options_.ramsey_policy
end
ys
=
oo_
.
steady_state
;
if
inst_nbr
==
1
nl_func
=
@
(
x
)
dyn_ramsey_static_
(
x
,
0
,
M_
,
options_
,
oo_
,
it_
);
nl_func
=
@
(
x
)
dyn_ramsey_static_
(
x
,
M_
,
options_
,
oo_
,
it_
);
inst_val
=
fzero
(
nl_func
,
oo_
.
steady_state
(
k_inst
));
else
[
inst_val
,
info1
]
=
dynare_solve
(
'dyn_ramsey_static_'
,
...
...
...
@@ -192,7 +192,11 @@ if options_.debug
save
([
M_
.
fname
'_debug.mat'
],
'jacobia_'
)
end
if
~
isreal
(
jacobia_
)
if
~
all
(
isfinite
(
jacobia_
(:)))
info
(
1
)
=
6
;
info
(
2
)
=
1
;
return
elseif
~
isreal
(
jacobia_
)
if
max
(
max
(
abs
(
imag
(
jacobia_
))))
<
1e-15
jacobia_
=
real
(
jacobia_
);
else
...
...
@@ -321,10 +325,6 @@ else % use original Dynare solver
b10
=
b
(
1
:
nstatic
,
1
:
nstatic
);
b11
=
b
(
1
:
nstatic
,
nstatic
+
1
:
end
);
b2
=
b
(
nstatic
+
1
:
end
,
nstatic
+
1
:
end
);
if
any
(
isinf
(
a
(:)))
info
=
1
;
return
end
% buildind D and E
d
=
zeros
(
nd
,
nd
)
;
...
...
matlab/print_info.m
View file @
cee82819
...
...
@@ -45,7 +45,8 @@ if ~noprint
error
([
'Blanchard Kahn conditions are not satisfied:'
...
' indeterminacy due to rank failure'
])
case
6
error
(
'The jacobian matrix evaluated at the steady state is complex'
)
error
([
'The Jacobian matrix evaluated at the steady state contains elements '
...
'that are not real or finite'
])
case
19
error
(
'The steadystate file did not compute the steady state (inconsistent deep parameters).'
)
case
20
...
...
Write
Preview
Supports
Markdown
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