simple-squiggle

A restricted subset of Squiggle
Log | Files | Refs | README

dotDivide.md (1123B)


      1 <!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
      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 &#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 
     24 Type | Description
     25 ---- | -----------
     26 number &#124; BigNumber &#124; Fraction &#124; Complex &#124; Unit &#124; Array &#124; Matrix | Quotient, `x ./ y`
     27 
     28 
     29 ### Throws
     30 
     31 Type | Description
     32 ---- | -----------
     33 
     34 
     35 ## Examples
     36 
     37 ```js
     38 math.dotDivide(2, 4)   // returns 0.5
     39 
     40 a = [[9, 5], [6, 1]]
     41 b = [[3, 2], [5, 2]]
     42 
     43 math.dotDivide(a, b)   // returns [[3, 2.5], [1.2, 0.5]]
     44 math.divide(a, b)      // returns [[1.75, 0.75], [-1.75, 2.25]]
     45 ```
     46 
     47 
     48 ## See also
     49 
     50 [divide](divide.md),
     51 [multiply](multiply.md),
     52 [dotMultiply](dotMultiply.md)