UNPKG

1.07 kBMarkdownView Raw
1<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
2
3# Function dotDivide
4
5Divide two matrices element wise. The function accepts both matrices and
6scalar values.
7
8
9## Syntax
10
11```js
12math.dotDivide(x, y)
13```
14
15### Parameters
16
17Parameter | Type | Description
18--------- | ---- | -----------
19`x` | number &#124; BigNumber &#124; Fraction &#124; Complex &#124; Unit &#124; Array &#124; Matrix | Numerator
20`y` | number &#124; BigNumber &#124; Fraction &#124; Complex &#124; Unit &#124; Array &#124; Matrix | Denominator
21
22### Returns
23
24Type | Description
25---- | -----------
26number &#124; BigNumber &#124; Fraction &#124; Complex &#124; Unit &#124; Array &#124; Matrix | Quotient, `x ./ y`
27
28
29## Examples
30
31```js
32math.dotDivide(2, 4) // returns 0.5
33
34a = [[9, 5], [6, 1]]
35b = [[3, 2], [5, 2]]
36
37math.dotDivide(a, b) // returns [[3, 2.5], [1.2, 0.5]]
38math.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)