Smith normal form of rectangular matrix in MATLAB

623 Views Asked by At

Suppose I've got a nonsquare integer matrix, say $\begin{pmatrix}3 & 1 & 1 & 1\\1 & 1 & 1 &1\end{pmatrix}$ and want to compute its Smith normal form--in this case, $\begin{pmatrix}1 & 0 & 0 & 0\\0 & 2 & 0 & 0\end{pmatrix}$. Is there an easy way to do this in MATLAB's symbolic toolbox? Its function for computing SNF requires invertible arguments.