Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Determine inequality

`A ~= B`

`ne(A,B)`

returns
a logical array with elements set to logical `A`

~= `B`

`1`

(`true`

)
where arrays `A`

and `B`

are not
equal; otherwise, the element is logical `0`

(`false`

).
The test compares both real and imaginary parts of numeric arrays. `ne`

returns
logical `1`

(`true`

) where `A`

or `B`

have
NaN or undefined categorical elements.

Was this topic helpful?