Commit c402bd89 authored by sebastien's avatar sebastien

qz/mjdgges.m: fail under Octave, since Octave can't compute a complex QZ


git-svn-id: https://www.dynare.org/svn/dynare/trunk@3201 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 8198b1a1
......@@ -21,7 +21,7 @@ function [ss,tt,w,sdim,eigval,info] = mjdgges(e,d,qz_criterium)
% SPECIAL REQUIREMENTS
% none.
% Copyright (C) 1996-2008 Dynare Team
% Copyright (C) 1996-2009 Dynare Team
%
% This file is part of Dynare.
%
......@@ -38,6 +38,14 @@ function [ss,tt,w,sdim,eigval,info] = mjdgges(e,d,qz_criterium)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
if exist('OCTAVE_VERSION')
% Octave can only compute a real QZ with the function qz()
% while by default MATLAB computes a complex QZ
% Here we need a complex QZ (so that ss and tt are uppeer
% triangular), so fail under Octave
error('You must compile the MEX file "mjddges", I can''t solve the model without that.')
end
% Chek number of inputs and outputs.
if nargin>3 | nargin<2
error('Three or two input arguments required!')
......@@ -66,9 +74,6 @@ info = 0;
% Computational part.
try
[ss,tt,qq,w] = qz(e,d);
if exist('OCTAVE_VERSION')
qq = qq';
end
[tt,ss,qq,w] = qzdiv(qz_criterium,tt,ss,qq,w);
warning_old_state = warning;
warning off;
......
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