< <= > >= == != (Conditional Operators)

Purpose:

Determines conditional relationships between expressions.

Syntax:

val1 op val2

val1

-

A scalar, series, or table.

val2

-

A scalar, series, or table.

Returns:

A scalar, series, or table (containing the value 1 or 0) of the same type as the higher of the two expressions. 1: True; 0: False. Integer is the lowest type, Real is next, and Complex is the highest type. If one or both of the expressions is a series, then a series results. The following is a list of type conversion rules:

 

Integer

op

Real

yields Real

Integer

op

Series

yields Series

Integer

op

Integer

yields Integer

Real

op

Complex

yields Complex

Real

op

Series

yields Series

Complex

op

Real Series

yields Complex Series

 

 

The following relational operators and functions are supported:

 

Operator

Function

Description

<

LESSER

left value less than right value

<=

LESSEREQUAL

left value less than or equal to right value

>

GREATER

left value greater than right value

>=

GREATEREQIAL

left value greater or equal to right value

==

ISEQUAL

left value equal to right value

!=

NOTEQUAL

left value not equal to right value

Example:

max(W1) <= 10.0

 

returns a 1 if the maximum value of W1 is less than or equal to 10.0, or 0 if the maximum value of W1 is not less than or equal to 10.0. If W1 contains a series, then

 

W1 > 10.0

 

returns a series the same length as W1 containing a 1 for each observation that is greater than 10 and 0 for each observation that is less than or equal to 10.0.

Remarks:

The returned series of ones and zeros is called a "Binary Series".

See Also:

&& || ! AND OR NOT XOR (Logical Operators)

GREATER

GREATEREQUAL

ISEQUAL

LESSER

LESSEREQUAL

NOTEQUAL