If diagonal is not properly ordered in Smith Normal Form, this function reorders by gcd/lcm.
Diagonal of matrix to be turned into Smith Normal Form.
A vector, containing the diagonal of a matrix to be turned into Smith Normal Form.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.