1 |
|
2 |
|
3 | # Function dotDivide
|
4 |
|
5 | Divide two matrices element wise. The function accepts both matrices and
|
6 | scalar values.
|
7 |
|
8 |
|
9 | ## Syntax
|
10 |
|
11 | ```js
|
12 | math.dotDivide(x, y)
|
13 | ```
|
14 |
|
15 | ### Parameters
|
16 |
|
17 | Parameter | Type | Description
|
18 | --------- | ---- | -----------
|
19 | `x` | number | BigNumber | Fraction | Complex | Unit | Array | Matrix | Numerator
|
20 | `y` | number | BigNumber | Fraction | Complex | Unit | Array | Matrix | Denominator
|
21 |
|
22 | ### Returns
|
23 |
|
24 | Type | Description
|
25 | ---- | -----------
|
26 | number | BigNumber | Fraction | Complex | Unit | Array | Matrix | Quotient, `x ./ y`
|
27 |
|
28 |
|
29 | ## Examples
|
30 |
|
31 | ```js
|
32 | math.dotDivide(2, 4) // returns 0.5
|
33 |
|
34 | a = [[9, 5], [6, 1]]
|
35 | b = [[3, 2], [5, 2]]
|
36 |
|
37 | math.dotDivide(a, b) // returns [[3, 2.5], [1.2, 0.5]]
|
38 | math.divide(a, b) // returns [[1.75, 0.75], [-1.75, 2.25]]
|
39 | ```
|
40 |
|
41 |
|
42 | ## See also
|
43 |
|
44 | [divide](divide.md),
|
45 | [multiply](multiply.md),
|
46 | [dotMultiply](dotMultiply.md)
|