paley {survey} | R Documentation |
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 7919, and beyond that if the user can specify
a suitable prime.
paley(n, nmax = 2 * n, prime=NULL, check=!is.null(prime))
n |
Minimum size for matrix |
nmax |
Maximum size for matrix. Ignored if prime is specified. |
prime |
Optional if n<7920 . A prime at least as large as
n , such that prime+1 is divisible by 4. |
check |
Check that the resulting matrix is of Hadamard type |
A matrix of zeros and ones, or NULL
if no matrix smaller than
nmax
can be found.
p<-paley(11) p1<-2*p-1 ## HH^T is diagonal for any Hadamard matrix p1%*%t(p1)