主要内容

hadamard

哈达玛矩阵

说明

H = hadamard(n) 返回阶次为 n哈达玛矩阵

示例

H = hadamard(n,classname) 返回 classname 类的矩阵,该类可以是 'single''double'

示例

全部折叠

计算 4×4 哈达玛矩阵。

H = hadamard(4)
H = 4×4

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

输入参数

全部折叠

矩阵的阶次,指定为非负整数标量。

示例: hadamard(4)

数据类型: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical

矩阵的类,指定为 'double''single'

示例: hadamard(4,'single')

数据类型: char

限制

  • 只有当 rem(n,4) = 0 时,才存在 n×n哈达玛矩阵(其中 n > 2)。此函数仅处理 nn/12n/20 为 2 的幂的情况。

详细信息

全部折叠

参考

[1] Ryser, Herbert J. Combinatorial Mathematics. Mathematical Association of America, 1963.

[2] Pratt, William K. Digital Signal Processing. New York, NY: John Wiley and Sons, 1978.

扩展功能

全部展开

版本历史记录

在 R2006a 之前推出

另请参阅

| |