Commit 3c0ebb4c authored by MichelJuillard's avatar MichelJuillard
Browse files

added error for near 0/0 on diagonal of Real Generalized Schur decomposition...

added error for near 0/0 on diagonal of Real Generalized Schur decomposition (info=7) and corrected error in test for singular w1 submatrix, introduced in Sept. 2010.
parent 5f3290f7
...@@ -378,6 +378,11 @@ else % use original Dynare solver ...@@ -378,6 +378,11 @@ else % use original Dynare solver
if ~exist('OCTAVE_VERSION') if ~exist('OCTAVE_VERSION')
dr.eigval = eig(e,d); dr.eigval = eig(e,d);
end end
for i=1:nd
if abs(ss(i,i)) < 1e-6 && abs(tt(i,i)) < 1e-6
info(7) = 1;
end
end
return return
end end
...@@ -412,7 +417,7 @@ else % use original Dynare solver ...@@ -412,7 +417,7 @@ else % use original Dynare solver
% derivatives with respect to dynamic state variables % derivatives with respect to dynamic state variables
% forward variables % forward variables
w1 =w(1:n3,n2:nd); w1 =w(1:n3,n2:nd);
if ~isfloat(w1) && (condest(w1) > 1e9) if ~isscalar(w1) && (condest(w1) > 1e9)
% condest() fails on a scalar under Octave % condest() fails on a scalar under Octave
info(1) = 5; info(1) = 5;
info(2) = condest(w1); info(2) = condest(w1);
......
...@@ -48,6 +48,9 @@ if ~noprint ...@@ -48,6 +48,9 @@ if ~noprint
case 6 case 6
error(['The Jacobian matrix evaluated at the steady state contains elements ' ... error(['The Jacobian matrix evaluated at the steady state contains elements ' ...
'that are not real or are infinite']) 'that are not real or are infinite'])
case 7
error(['One of the eigenvalue is is close to 0/0 (the absolute ' ...
'value of numerator and denominator is smaller than 1e-6).'])
case 19 case 19
error('The steadystate file did not compute the steady state (inconsistent deep parameters).') error('The steadystate file did not compute the steady state (inconsistent deep parameters).')
case 20 case 20
......
Supports Markdown
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