Function Reference
— Function File: hadamard (n)

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, meaning Hn(:,1) == 1 and H(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 with abs (A (i, j)) <= 1.
  • Multiply any row or column by -1 and still have a Hadamard matrix.