Navigation

Operators and Keywords

Function List:

C++ API

: 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 Hn(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) <= abs (det (Hn)) for all A with abs (A(i, j)) <= 1.
  • Multiplying any row or column by -1 and the matrix will remain a Hadamard matrix.

See also: compan, hankel, toeplitz.

Package: octave