# TOEPLITZ

## Purpose:

Generates a Toeplitz matrix.

## Syntax:

TOEPLITZ(c, r)

 c - A series, the first column of the output array. r - Optional, a series, the first row of the output array. Defaults to c.

## Returns:

An array, a symmetric or unsymmetric Toeplitz matrix.

## Example:

c = {1, 2, 3};

t = toeplitz(c);

t == {{1, 2, 3},

{2, 1, 2},

{3, 3, 1}}

The first row and column of t is identical to c.

## Example:

c = {1, 2, 3};

r = {1, 8, 9};

t = toeplitz(c, r);

t == {{1, 8, 9},

{2, 1, 8},

{3, 2, 1}}

The first row is identical to r and the first column is identical to c.

## Remarks:

For column c and row r, a square Toeplitz matrix takes the form:

c[1]   r[2]   r[3]  ...  r[n]

c[2]   c[1]   r[2]  ...  r[n-1]

c[3]   c[2]   c[1]  ...  r[n-2]

.      .      .   .      .

.      .      .     .    .

.      .      .       .  .

c[n]   c[n-1] c[n-2] ... c[1]

If r is not specified, a symmetric Toeplitz matrix is returned where c represents the first row and column.

If r is specified, an unsymmetric Toeplitz matrix is returned where the first column is c and the first row is r. In this case, if c[1] r[1], c[1] is used as the first element.