FUNCTION REFERENCE

hadamard

Hadamard matrix.

Hadamard matrix.

Syntax

H = hadamard(n)

n, n/12 or n/20 must be a power of 2 (as in MATLAB; 28 is not accepted).

H has +1/-1 entries and H*H' = n*eye(n).

Example

hadamard(4)   % [1 1 1 1; 1 -1 1 -1; 1 1 -1 -1; 1 -1 -1 1]

Differences from MATLAB: the order is limited to 4096. The 20 block follows the MATLAB

output; the 12 block is the Paley matrix, which equals the MATLAB output for hadamard(12).

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.