eq
equality, == operator.
📝Syntax
C = eq(A, B)
C = (A == B)
📥Input Arguments
Parameter Description
A a variable
B a variable
📤Output Arguments
Parameter Description
C result of A == B
📄Description

C = eq(A, B) returns a logical array with elements set to logicaltrue where arrays A and B are equals.

eq compares both real and imaginary parts of numeric arrays.

When inputs are sparse numeric or logical arrays, the result is a sparse logical array. Sparse single and single-complex operands are supported.

💡Examples
eye(2,2) == ones(2, 2)
0 == i
'Nelson' == 'Noslen'
"Nelson" == "Noslen"
'Nelson' == 'l'
eq(0.8-0.6-0.2, 0)
S = sparse(single([1 + 2i 0; 0 3]));
R = S == single([1 + 2i 5; 0 0])
🔗See Also
neltlegtge
🕔Version History
Version Description
1.0.0 initial version
2.0.0 sparse single and single-complex operands supported.
Edit this page on GitHub