ne

Perform inequality comparison, equivalent to the != operator.

Syntax

ne(x,y)

Inputs

x,y
Anything that can be logically tested.
Type: double | integer | char | string | logical | struct | cell
Dimension: scalar | string | vector | matrix

Outputs

R
Numerical representation of true or false (1 or 0).
Type: logical

Examples

Scalar example:

ne(2,1)
R = 1

Matrix example:

ne([2,4],[2,3])
R = [Matrix] 1 x 2
0  1