# Documentation

### This is machine translation

Translated by
Mouse over text to see original. Click the button below to return to the English verison of the page.

# toeplitz

Symbolic Toeplitz matrix

toeplitz(c,r)
toeplitz(r)

## Description

toeplitz(c,r) generates a nonsymmetric Toeplitz matrix having c as its first column and r as its first row. If the first elements of c and r are different, toeplitz issues a warning and uses the first element of the column.

toeplitz(r) generates a symmetric Toeplitz matrix if r is real. If r is complex, but its first element is real, then this syntax generates the Hermitian Toeplitz matrix formed from r. If the first element of r is not real, then the resulting matrix is Hermitian off the main diagonal, meaning that Tij = conjugate(Tji) for i ≠ j.

## Input Arguments

 c Vector specifying the first column of a Toeplitz matrix. r Vector specifying the first row of a Toeplitz matrix.

## Examples

Generate the Toeplitz matrix from these vectors. Because these vectors are not symbolic objects, you get floating-point results.

c = [1 2 3 4 5 6];
r = [1 3/2 3 7/2 5];
toeplitz(c,r)
ans =
1.0000    1.5000    3.0000    3.5000    5.0000
2.0000    1.0000    1.5000    3.0000    3.5000
3.0000    2.0000    1.0000    1.5000    3.0000
4.0000    3.0000    2.0000    1.0000    1.5000
5.0000    4.0000    3.0000    2.0000    1.0000
6.0000    5.0000    4.0000    3.0000    2.0000

Now, convert these vectors to a symbolic object, and generate the Toeplitz matrix:

c = sym([1 2 3 4 5 6]);
r = sym([1 3/2 3 7/2 5]);
toeplitz(c,r)
ans =
[ 1, 3/2,   3, 7/2,   5]
[ 2,   1, 3/2,   3, 7/2]
[ 3,   2,   1, 3/2,   3]
[ 4,   3,   2,   1, 3/2]
[ 5,   4,   3,   2,   1]
[ 6,   5,   4,   3,   2]

Generate the Toeplitz matrix from this vector:

syms a b c d
T = toeplitz([a b c d])
T =
[       a,       b,       c,       d]
[ conj(b),       a,       b,       c]
[ conj(c), conj(b),       a,       b]
[ conj(d), conj(c), conj(b),       a]

If you specify that all elements are real, then the resulting Toeplitz matrix is symmetric:

syms a b c d real
T = toeplitz([a b c d])
T =
[ a, b, c, d]
[ b, a, b, c]
[ c, b, a, b]
[ d, c, b, a]

For further computations, clear the assumptions:

syms a b c d clear

Generate the Toeplitz matrix from a vector containing complex numbers:

T = toeplitz(sym([1, 2, i]))
T =
[  1, 2, 1i]
[  2, 1, 2]
[ -1i, 2, 1]

If the first element of the vector is real, then the resulting Toeplitz matrix is Hermitian:

isAlways(T == T')
ans =
3×3 logical array
1   1   1
1   1   1
1   1   1

If the first element is not real, then the resulting Toeplitz matrix is Hermitian off the main diagonal:

T = toeplitz(sym([i, 2, 1]))
T =
[ 1i, 2, 1]
[ 2, 1i, 2]
[ 1, 2, 1i]
isAlways(T == T')
ans =
3×3 logical array
0     1     1
1     0     1
1     1     0

Generate a Toeplitz matrix using these vectors to specify the first column and the first row. Because the first elements of these vectors are different, toeplitz issues a warning and uses the first element of the column:

syms a b c
toeplitz([a b c], [1 b/2 a/2])
Warning: First element of input column does not match first element of input row.
Column wins diagonal conflict.

ans =
[ a, b/2, a/2]
[ b,   a, b/2]
[ c,   b,   a]

collapse all

### Toeplitz Matrix

A Toeplitz matrix is a matrix that has constant values along each descending diagonal from left to right. For example, matrix T is a symmetric Toeplitz matrix:

$T=\left(\begin{array}{ccccccc}{t}_{0}& {t}_{1}& {t}_{2}& & & & {t}_{k}\\ {t}_{-1}& {t}_{0}& {t}_{1}& \cdots & & & \\ {t}_{-2}& {t}_{-1}& {t}_{0}& & & & \\ & ⋮& & \ddots & & ⋮& \\ & & & & {t}_{0}& {t}_{1}& {t}_{2}\\ & & & \cdots & {t}_{-1}& {t}_{0}& {t}_{1}\\ {t}_{-k}& & & & {t}_{-2}& {t}_{-1}& {t}_{0}\end{array}\right)$

### Tips

• Calling toeplitz for numeric arguments that are not symbolic objects invokes the MATLAB® toeplitz function.