IsHankel
Tests if a matrix is Hankel.
Syntax
-
IsHankel(A[, ε])
-
A
is a matrix -
ε
is a positive number
-
Description
If A
is a matrix, then IsHankel(A, ε)
returns true
iff A
is a Hankel matrix, that is, iff A[i, j] = A[i − 1, j + 1]
for all indices i, j
for which the equation is defined. Floating-point comparisons are made with epsilon ε
.
Note that IsHankel(A, ε)
might be true
even if A
is not square.
Examples
A ≔ ❨❨1, 4, 1, 5, 9, 2❩, ❨4, 1, 5, 9, 2, 0❩, ❨1, 5, 9, 2, 0, 7❩, ❨5, 9, 2, 0, 7, 3❩❩
⎛1 4 1 5 9 2⎞ ⎜4 1 5 9 2 0⎟ ⎜1 5 9 2 0 7⎟ ⎝5 9 2 0 7 3⎠
IsHankel(A)
true