2014-05-17 12:21:31 +02:00

1.0 KiB

Function edivide

Divide two matrices element wise. The function accepts both matrices and scalar values.

Syntax

math.edivide(x, y)

Parameters

Parameter Type Description
x Number | BigNumber | Boolean | Complex | Unit | Array | Matrix Numerator
y Number | BigNumber | Boolean | Complex | Unit | Array | Matrix Denominator

Returns

Type Description
Number | BigNumber | Complex | Unit | Array | Matrix Quotient, x ./ y

Examples

var math = mathjs();

math.edivide(2, 4);   // returns 0.5

a = [[9, 5], [6, 1]];
b = [[3, 2], [5, 2]];

math.edivide(a, b);   // returns [[3, 2.5], [1.2, 0.5]]
math.divide(a, b);    // returns [[1.75, 0.75], [-1.75, 2.25]]

See also

divide, multiply, emultiply