1.1 KiB

Function dotEqual

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

Syntax

math.dotEqual(x, y)

Parameters

Parameter Type Description
x Number | BigNumber | Boolean | Complex | Unit | Array | Matrix First matrix to compare
y Number | BigNumber | Boolean | Complex | Unit | Array | Matrix Second matrix to compare

Returns

Type Description
Number | BigNumber | Complex | Unit | Array | Matrix Returns a matrix containing boolean results of the element wise comparisons.

Examples

var math = mathjs();

math.dotEqual(2, 4);   // returns false

a = [2, 5, 1];
b = [2, 7, 1];

math.dotEqual(a, b);   // returns [true, false, true]
math.equal(a, b);      // returns false

See also

equal, unequal, dotuneuqal