Algosim documentation: IsToeplitz

IsToeplitz

Tests if a matrix is Toeplitz.

Syntax

Description

If A is a matrix, then IsToeplitz(A, ε) returns true iff A is a Toeplitz 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 IsToeplitz(A, ε) might be true even if A is not square.

Examples

A ≔ ❨❨1, 4, 1, 5, 9, 2❩, ❨7, 1, 4, 1, 5, 9❩, ❨0, 7, 1, 4, 1, 5❩, ❨2, 0, 7, 1, 4, 1❩❩
⎛1  4  1  5  9  2⎞
⎜7  1  4  1  5  9⎟
⎜0  7  1  4  1  5⎟
⎝2  0  7  1  4  1⎠
IsToeplitz(A)
true

See also