IsEssentiallyZeroRow
Tests if a matrix row contains only zeros, except possibly the rightmost entry.
Syntax
-
IsEssentiallyZeroRow(A, n[, ε])
-
A
is a matrix -
n
is a positive integer -
ε
is a positive number
-
Description
If A
is a matrix and n
a valid row index in A
, then IsEssentiallyZeroRow(A, n, ε)
returns true
iff the n
th row of A
consists only of zeros (compared with epsilon ε
), except possibly the rightmost entry on the row.
Examples
A ≔ ❨❨1, 5, 3, 2, 1❩, ❨0, 0, 1, 2, 3❩, ❨0, 0, 0, 0, 1❩❩
⎛1 5 3 2 1⎞ ⎜0 0 1 2 3⎟ ⎝0 0 0 0 1⎠
IsEssentiallyZeroRow(A, 3)
true