v4.1:: Added a test for complex numbers in matrices E and D before the

call to mjdgges.


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2430 ac1d8469-bf42-47a9-8791-bf33cf982152
time-shift
stepan 2009-02-19 15:37:55 +00:00
parent 476e2d847f
commit 5f02e69a67
2 changed files with 21 additions and 0 deletions

View File

@ -19,6 +19,8 @@ function [dr,info,M_,options_,oo_] = dr1(dr,task,M_,options_,oo_)
% info=4: BK order condition not satisfied info(2) contains "distance"
% indeterminacy.
% info=5: BK rank condition not satisfied.
% info=6: Matrix E has complex elements.
% info=7: Matrix D has complex elements.
% M_ [matlab structure]
% options_ [matlab structure]
% oo_ [matlab structure]
@ -351,6 +353,23 @@ function [dr,info,M_,options_,oo_] = dr1(dr,task,M_,options_,oo_)
% 2) In global_initialization.m, if mjdgges.m is visible exist(...)==2,
% this means that the DLL isn't avaiable and use_qzdiv is set to 1
if ~isreal(e)
if max(max(abs(imag(e)))) < 1e-15
e = real(e);
else
info(1) = 6;
return
end
end
if ~isreal(d)
if max(max(abs(imag(d)))) < 1e-15
d = real(d);
else
info(1) = 7;
return
end
end
[ss,tt,w,sdim,dr.eigval,info1] = mjdgges(e,d,options_.qz_criterium);
if info1

View File

@ -14,6 +14,8 @@ function [dr,info]=resol(ys,check_flag)
% info=3: Blanchard Kahn conditions are not satisfied: no stable '...' equilibrium
% info=4: Blanchard Kahn conditions are not satisfied:'...' indeterminacy
% info=5: Blanchard Kahn conditions are not satisfied:'...' indeterminacy due to rank failure
% info=6: Matrix E is complex (cannot apply the generalized Schur).
% info=7: Matrix D is complex (cannot apply the generalized Schur).
% info=20: can't find steady state info(2) contains sum of sqare residuals
% info=30: Variance can't be computed
%