Track #21: Add partial information: Correcting bug stemming from the differences in QZ calculation under Octave and Matlab: modified PI_gensys to use C.Sims' Lapack zgges based qzcomplex() qz decomposition routine under Octave which gives nearly identical complex results to Matlab QZ (except for transpose of q matrix and few sign changes in the output matrices)

time-shift
George Perendia 2010-10-20 11:44:45 +01:00
parent 057908baf6
commit e8a193bbfb
1 changed files with 10 additions and 1 deletions

View File

@ -153,7 +153,16 @@ end
G0pi=eye(n+FL_RANK+NX);
try
[a b q z v]=qz(G0pi,G1pi);
% In Matlab: [aa bb q z v w] = qz(a,b) s.t. qaz = aa, qbz = bb %
% In Octave: [aa bb q z v w] = qz(a,b) s.t. q'az = aa, q'bz=bb %
% and qzcomplex() extension based on lapack zgges produces same
% qz output for Octave as Matlab qz() does for Matlab thus:
if exist('OCTAVE_VERSION')
[a b q z]=qzcomplex(G0pi,G1pi);
q=q';
else
[a b q z]=qz(G0pi,G1pi);
end
catch
try
lerror=lasterror;