Code for Residual-based iterations for the generalized Lyapunov equation

Matlab code related to the paper T. Breiten, E. Ringh; Residual-based iterations for the generalized Lyapunov equation.
The code is for generating the residual-based rational-Krylov-type subspaces suggested in the paper.