| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
H = hadamard(n)
H = hadamard(n) returns the Hadamard matrix of order n.
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.
The command hadamard(4) produces the 4-by-4 matrix:
1 1 1 1 1 -1 1 -1 1 1 -1 -1 1 -1 -1 1
[1] Ryser, H. J., Combinatorial Mathematics, John Wiley and Sons, 1963.
[2] Pratt, W. K., Digital Signal Processing, John Wiley and Sons, 1978.
![]() | gzip | handle | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |