LESSEREQUAL

Purpose:

Determines if one expression is less than or equal to another expression.

Syntax:

LESSEREQUAL(val1, 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

<=

Real

yields Real

Integer

<=

Series

yields Series

Integer

<=

Integer

yields Integer

Real

<=

Complex

yields Complex

Real

<=

Series

yields Series

Complex

<=

Real Series

yields Complex Series

String

<=

String

yields String

 

Example:

lesserequal(max(W1), 30)

 

returns a 1 if the maximum value of W1 is less than or equal to 30.0, or 0 if the maximum value of W1 is not less than or equal to 30.0.

Example:

lesserequal({1, 3, 4}, {0, 5, 2})

 

returns a series {0, 1, 0}.

Remarks:

LESSEREQUAL(a, b) is equivalent to a <= b.

 

String comparisons use STRCMP

See Also:

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

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

GREATER

LESSER