This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

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.

Relational Operations

Value comparisons


eqDetermine equality
geDetermine greater than or equal to
gtDetermine greater than
leDetermine less than or equal to
ltDetermine less than
neDetermine inequality
isequalDetermine array equality
isequalnDetermine array equality, treating NaN values as equal


Array Comparison with Relational Operators

Use relational operators like “less than”, “greater than”, and “not equal to” to compare arrays. The result is a logical array indicating the locations where the relation is true.

Operator Precedence

Precedence rules determine the order in which MATLAB® evaluates an expression.