Creates symmetric and asymmetric Toeplitz matrices.

toeplitz.spam(x, y = NULL, eps = getOption("spam.eps"))

Arguments

x

the first row to form the Toeplitz matrix.

y

for asymmetric Toeplitz matrices, this contains the first column.

eps

A tolerance parameter: elements of x such that abs(x) <= eps set to zero. Defaults to eps = getOption("spam.eps").

Value

The Toeplitz matrix in spam format.

Details

The vector y has to be of the same length as x and its first element is discarded.

Author

Reinhard Furrer

Examples

toeplitz.spam(c(1,.25,0,0,0))
#>  [1] 1.00 0.25 0.25 1.00 0.25 0.25 1.00 0.25 0.25 1.00 0.25 0.25 1.00
#> Class 'spam' (32-bit)