Construct a Hadamard matrix Hn of size n-by-n. The size n must be of the form
2 ^
k*
p in which p is one of 1, 12, 20 or 28. The returned matrix is normalized, meaningHn(:,1) == 1
andH(1,:) == 1
.Some of the properties of Hadamard matrices are:
kron (
Hm,
Hn)
is a Hadamard matrix of size m-by-n.Hn * Hn' ==
n* eye (
n)
.- The rows of Hn are orthogonal.
det (
A) <= det (
Hn)
for all A withabs (
A(
i,
j)) <= 1
.- Multiply any row or column by -1 and still have a Hadamard matrix.