1 |
|
2 |
|
3 | # Function conj
|
4 |
|
5 | Compute the complex conjugate of a complex value.
|
6 | If `x = a+bi`, the complex conjugate of `x` is `a - bi`.
|
7 |
|
8 | For matrices, the function is evaluated element wise.
|
9 |
|
10 |
|
11 | ## Syntax
|
12 |
|
13 | ```js
|
14 | math.conj(x)
|
15 | ```
|
16 |
|
17 | ### Parameters
|
18 |
|
19 | Parameter | Type | Description
|
20 | --------- | ---- | -----------
|
21 | `x` | number | BigNumber | Complex | Array | Matrix | A complex number or array with complex numbers
|
22 |
|
23 | ### Returns
|
24 |
|
25 | Type | Description
|
26 | ---- | -----------
|
27 | number | BigNumber | Complex | Array | Matrix | The complex conjugate of x
|
28 |
|
29 |
|
30 | ## Examples
|
31 |
|
32 | ```js
|
33 | math.conj(math.complex('2 + 3i')) // returns Complex 2 - 3i
|
34 | math.conj(math.complex('2 - 3i')) // returns Complex 2 + 3i
|
35 | math.conj(math.complex('-5.2i')) // returns Complex 5.2i
|
36 | ```
|
37 |
|
38 |
|
39 | ## See also
|
40 |
|
41 | [re](re.md),
|
42 | [im](im.md),
|
43 | [arg](arg.md),
|
44 | [abs](abs.md)
|