Truncate Values in an array (matrix)
Truncate Values in an array (matrix) below a certain threshold If you perform numerical calculations like the QR-Decomposition you can come across numerical rounding errors. In this code snippet we calculate the first householder vector and matrix to perform a QR Decomposition of random integer 4x4 Matrix. The matrix looks likes this: $$ A = \begin{bmatrix} -1 & -6 & 5 & -10 \ 7 & 6 & 7 & -2 \ -1 & -10 & 0 & -2 \ -6 & 9 & 6 & -6 \ \end{bmatrix} $$...