Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

hadamard

Hadamard matrix

Syntax

H = hadamard(n)

Description

H = hadamard(n) returns the Hadamard matrix of order n.

Definitions

Hadamard matrices are matrices of 1's and -1's whose columns are orthogonal,

H'*H = n*I

where [n n]=size(H) and I = eye(n,n).

They have applications in several different areas, including combinatorics, signal processing, and numerical analysis, [1], [2].

An n-by-n Hadamard matrix with n > 2 exists only if rem(n,4) = 0. This function handles only the cases where n, n/12, or n/20 is a power of 2.

Examples

collapse all

Compute the 4-by-4 Hadamard matrix.

H = hadamard(4)
H =

     1     1     1     1
     1    -1     1    -1
     1     1    -1    -1
     1    -1    -1     1

References

[1] Ryser, H. J., Combinatorial Mathematics, John Wiley and Sons, 1963.

[2] Pratt, W. K., Digital Signal Processing, John Wiley and Sons, 1978.

See Also

| |

Introduced before R2006a

Was this topic helpful?