From c402bd896996f1c651469899dbae1e66dda8d04e Mon Sep 17 00:00:00 2001 From: sebastien <sebastien@ac1d8469-bf42-47a9-8791-bf33cf982152> Date: Mon, 7 Dec 2009 11:34:54 +0000 Subject: [PATCH] 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 --- matlab/qz/mjdgges.m | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/matlab/qz/mjdgges.m b/matlab/qz/mjdgges.m index 819a3d9224..577255af76 100644 --- a/matlab/qz/mjdgges.m +++ b/matlab/qz/mjdgges.m @@ -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; -- GitLab