Is there any ready code which gives an algorithm of expressing a matrix pencil in its Kronecker's Canonical Form? 


There is an old result which gives an algorithm for an arbitrary pencil but it is lengthy and looks quite tedious. 


<http://www.sciencedirect.com/science/article/pii/0024379579900351> 



Algorithm for Computing Kronecker's Canonical Form for Matrix Pencils
[GUPTRI](http://www8.cs.umu.se/~guptri/) by Jim Demmel and Bo Kagstrom computes a triangular decomposition that reveals the Kronecker structure of a pencil. It is Fortran code that can be called from Matlab using a Mex-file interface.


The code is quite old, though. Probably the Fortran part can still be compiled and run without changes, but I can speak for experience that getting old MEX files to run on a modern 64-bit Matlab can require lots of tweaking.


