Skip to content
Snippets Groups Projects
Commit c402bd89 authored by sebastien's avatar sebastien
Browse files

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
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,7 @@ function [ss,tt,w,sdim,eigval,info] = mjdgges(e,d,qz_criterium) ...@@ -21,7 +21,7 @@ function [ss,tt,w,sdim,eigval,info] = mjdgges(e,d,qz_criterium)
% SPECIAL REQUIREMENTS % SPECIAL REQUIREMENTS
% none. % none.
% Copyright (C) 1996-2008 Dynare Team % Copyright (C) 1996-2009 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
...@@ -38,6 +38,14 @@ function [ss,tt,w,sdim,eigval,info] = mjdgges(e,d,qz_criterium) ...@@ -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 % You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % 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. % Chek number of inputs and outputs.
if nargin>3 | nargin<2 if nargin>3 | nargin<2
error('Three or two input arguments required!') error('Three or two input arguments required!')
...@@ -66,9 +74,6 @@ info = 0; ...@@ -66,9 +74,6 @@ info = 0;
% Computational part. % Computational part.
try try
[ss,tt,qq,w] = qz(e,d); [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); [tt,ss,qq,w] = qzdiv(qz_criterium,tt,ss,qq,w);
warning_old_state = warning; warning_old_state = warning;
warning off; warning off;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment