# Smith normal form of rectangular matrix in MATLAB

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.

## This question has an open bounty worth +100 reputation from S Huntsman ending in 3 days.

This question has not received enough attention.