We propose an algorithm for computing the inverses of rational matrice
s and in particular the inverses of polynomial matrices. The algorithm
is based on minimal state space realizations of proper rational matri
ces and the matrix inverse lemma and is implemented as a MATLAB functi
on. Experiments show that the algorithm gives accurate results for typ
ical rational matrices that arise in analysis and design of linear mul
tivariable control systems. Illustrative examples are given.