1 |
|
2 |
|
3 | # Function dotPow
|
4 |
|
5 | Calculates the power of x to y element wise.
|
6 |
|
7 |
|
8 | ## Syntax
|
9 |
|
10 | ```js
|
11 | math.dotPow(x, y)
|
12 | ```
|
13 |
|
14 | ### Parameters
|
15 |
|
16 | Parameter | Type | Description
|
17 | --------- | ---- | -----------
|
18 | `x` | number | BigNumber | Complex | Unit | Array | Matrix | The base
|
19 | `y` | number | BigNumber | Complex | Unit | Array | Matrix | The exponent
|
20 |
|
21 | ### Returns
|
22 |
|
23 | Type | Description
|
24 | ---- | -----------
|
25 | number | BigNumber | Complex | Unit | Array | Matrix | The value of `x` to the power `y`
|
26 |
|
27 |
|
28 | ## Examples
|
29 |
|
30 | ```js
|
31 | math.dotPow(2, 3) // returns number 8
|
32 |
|
33 | const a = [[1, 2], [4, 3]]
|
34 | math.dotPow(a, 2) // returns Array [[1, 4], [16, 9]]
|
35 | math.pow(a, 2) // returns Array [[9, 8], [16, 17]]
|
36 | ```
|
37 |
|
38 |
|
39 | ## See also
|
40 |
|
41 | [pow](pow.md),
|
42 | [sqrt](sqrt.md),
|
43 | [multiply](multiply.md)
|