The block diagonal system having the eigenvalues along the diagonal and ones in some of the superdiagonal elements (which serve to couple repeated eigenvalues) is called Jordan canonical form. Each block size corresponds to the multiplicity of the repeated pole. As an example, a pole of multiplicity could give rise to the following Jordan block:
Interestingly, neither Matlab nor Octave seem to have a numerical function for computing the Jordan canonical form of a matrix. Matlab will try to do it symbolically when the matrix entries are given as exact rational numbers (ratios of integers) by the jordan function, which requires the Maple symbolic mathematics tool box. Numerically, it is generally difficult to distinguish between poles that are repeated exactly, and poles that are merely close together. The residuez function sets a numerical threshold below which poles are treated as repeated.