circulant_mat: circulant_mat

Description Usage Arguments Details Value References Examples

View source: R/circulant_mat.R

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

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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

HadamardR documentation built on April 14, 2020, 7:01 p.m.