circulant_mat {HadamardR}R Documentation

circulant_mat

Description

A matrix is said to be circulant if (i+1, j+1)th entry is equal to the (i, j)th entry. Thus, for such matrices, the initial row determines the complex matrix. Whenever i+1,j+1 exceeds the order, modulus operation is carried out.

Usage

circulant_mat(x = NA)

Arguments

x

a vector to be used as intial row.

Details

circulant_mat performs construction of circulant matrices.

Value

circulant matrix of order length of input vector.

References

Hedayat, A. and Wallis, W.D. (1978). Hadamard Matrices and Their Application.Ann. Stat., 6, 1184-1238.

Examples

circulant_mat(c(1,1,-1,0))
#      [,1] [,2] [,3] [,4]
#[1,]    1    1   -1    0
#[2,]    0    1    1   -1
#[3,]   -1    0    1    1
#[4,]    1   -1    0    1
circulant_mat(c(5,9,-7,-2))
#      [,1] [,2] [,3] [,4]
#[1,]    5    9   -7   -2
#[2,]   -2    5    9   -7
#[3,]   -7   -2    5    9
#[4,]    9   -7   -2    5

[Package HadamardR version 1.0.0 Index]