Skip to content

ordqz

builtin · libnexusinterp/corefcn/ordqz-proprietary.cc

: [AAS, BBS, QS, ZS] = ordqz (AA, BB, Q, Z, select)

Reorder a generalized Schur decomposition.

AA, BB, Q and Z come from qz, with Q*A*Z = AA and Q*B*Z = BB. The outputs satisfy the same relations for QS and ZS and carry the selected generalized eigenvalues AA(k,k)/BB(k,k) in the leading diagonal positions, the others following in their original order.

select is either a vector with one entry per diagonal position (a nonzero entry selects that eigenvalue), or one of the keywords "lhp" (real part negative), "rhp" (real part positive), "udi" (inside the unit disk) and "udo" (outside the unit disk).