maybe you’d know… Is there an elegant way to check regularity of a matrix. In the moment I’m checking its determinant. It works but when the matrix is singular it prints error message
I assume that you are using the Determinant() method of the
matrix class. It uses the LU decomposition which gives indeed
a warning in case of a singular matrix .
If these warnings annoy you, you can take measures into your
own hands by calling a decomposition directly . a Single-value
decomposition is supposed to never fail (and therefore gives
not this warning) . You can the ask for the determinant from this
decomposition and check for regularity: