The TOEPLITZ function generates a Toeplitz matrix from a vector, or a block Toeplitz matrix from a matrix. A block Toeplitz matrix has the property that all matrices on the diagonals are the same. The argument a is an or matrix; the value returned is the result.
The TOEPLITZ function uses the first submatrix, , of the argument matrix as the blocks of the main diagonal. The second submatrix, , of the argument matrix forms one secondary diagonal, with the transpose forming the other. The remaining diagonals are formed accordingly. If the first submatrix of the argument matrix is symmetric, the result is also symmetric. If is , the first p columns of the returned matrix, , are the same as . If is , the first p rows of are the same as .
The TOEPLITZ function is especially useful in time series applications, where the covariance matrix of a set of variables with its lagged set of variables is often assumed to be a block Toeplitz matrix.
If
and if is the matrix formed by the TOEPLITZ function, then
If
and if is the matrix formed by the TOEPLITZ function, then
Three examples follow:
r1 = toeplitz(1:5); r2 = toeplitz({1 2 , 3 4 , 5 6 , 7 8}); r3 = toeplitz({1 2 3 4, 5 6 7 8}); print r1, r2, r3;