toeplitz

Computes the Toeplitz matrix.

Syntax

T = toeplitz(C)

T = toeplitz(C, R)

Inputs

C
A vector used to assign the first column of the Toeplitz matrix.
R
A vector used to assign the first row of the Toeplitz matrix.

Outputs

T
The Toeplitz matrix.

Examples

One input:
c = [1:3];
T = toeplitz(c)
T = [Matrix] 3 x 3
1  2  3
2  1  2
3  2  1
Two inputs:
c = [1:3];
r = [1,8:10];
T = toeplitz(c, r)
T = [Matrix] 3 x 4
1  8  9  10
2  1  8   9
3  2  1   8

Comments

toeplitz(c) assigns the elements of c to the first column of the Toeplitz matrix, and zeros to the remaining elements of its first row.

toeplitz(c, r) assigns the elements of c to the first column of the Toeplitz matrix, and the elements of r to its first row, ignoring r(1). Typically, r(1) = c(1).

The remainder of the Toeplitz matrix is assigned by copying the elements of the first column and the first row along each diagonal.