Skip to content
Snippets Groups Projects
Verified Commit df5109d5 authored by Sébastien Villemot's avatar Sébastien Villemot Committed by Stéphane Adjemian
Browse files

Make matlab/missing/mex/mjdgges/mjdgges.m Octave-compatible

[skip ci]
parent c04960d5
No related branches found
No related tags found
No related merge requests found
...@@ -39,8 +39,8 @@ if nargin > 5 || nargin < 2 || nargout > 7 || nargout == 0 ...@@ -39,8 +39,8 @@ if nargin > 5 || nargin < 2 || nargout > 7 || nargout == 0
error('MJDGGES: takes 2, 3 or 4 input arguments and between 1 and 7 output arguments.') error('MJDGGES: takes 2, 3 or 4 input arguments and between 1 and 7 output arguments.')
end end
if isoctave if isoctave && octave_ver_less_than('7')
error('Octave unsupported, since it does not have real qz') error('Octave version 7 or higher is required (Octave 6 lacks the ordqz function)')
end end
[me, ne] = size(e); [me, ne] = size(e);
...@@ -56,7 +56,11 @@ end ...@@ -56,7 +56,11 @@ end
info = 0; info = 0;
try try
if isoctave
[ss, tt, qq, zz] = qz(e, d);
else
[ss, tt, qq, zz] = qz(e, d, 'real'); [ss, tt, qq, zz] = qz(e, d, 'real');
end
eigval = ordeig(ss, tt); eigval = ordeig(ss, tt);
select = abs(eigval) < qz_criterium; select = abs(eigval) < qz_criterium;
sdim = sum(select); sdim = sum(select);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment