Quantcast

Documentation Center

  • Trial Software
  • Product Updates

toeplitz

Symbolic Toeplitz matrix

Syntax


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, i]
[  2, 1, 2]
[ -i, 2, 1]

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

logical(T == T')
ans =
     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 =
[ i, 2, 1]
[ 2, i, 2]
[ 1, 2, i]
logical(T == T')
ans =
     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. [linalg::toeplitz] 
 
ans =
[ a, b/2, a/2]
[ b,   a, b/2]
[ c,   b,   a]

More About

expand 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:

Tips

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

See Also

|

Was this topic helpful?