函数 conj #
计算复数的复共轭。如果 x = a+bi,则 x 的复共轭是 a - bi。
对于矩阵,该函数逐元素求值。
Syntax #
math.conj(x)
Parameters #
| Parameter | Type | Description |
|---|---|---|
x |
number | BigNumber | Complex | Array | Matrix | Unit | 复数或包含复数的数组 |
Returns #
| Type | Description |
|---|---|
| number | BigNumber | Complex | Array | Matrix | Unit | x 的复共轭 |
Throws #
Type | Description —- | ———–
Examples #
math.conj(math.complex('2 + 3i')) // returns Complex 2 - 3i
math.conj(math.complex('2 - 3i')) // returns Complex 2 + 3i
math.conj(math.complex('-5.2i')) // returns Complex 5.2i