Learn R Programming

survey (version 3.1)

paley: Paley-type Hadamard matrices

Description

Computes a Hadamard matrix of dimension p+1, where p is a prime, and p+1 is a multiple of 4, using the Paley construction. Works for n up to 1367.

Usage

paley(n, nmax = 2 * n)

Arguments

n
Minimum size for matrix
nmax
Maximum size for matrix

Value

  • A matrix of zeros and ones, or NULL if no matrix smaller than nmax can be found.

See Also

hadamard

Examples

Run this code
p<-paley(11)

p1<-2*p-1
## HH^T is diagonal for any Hadamard matrix
p1%*%t(p1)

Run the code above in your browser using DataLab