ge

Greater than or equal to, the function form of the operator >=.

Category: Symbolic Computations in MATLAB > Operators and Elementary Operations

Syntax

C = ge(A, B)

Same as A >= B.

Description

The operator A >= B compares element by element. For complex numbers only the real parts are compared. Characters compare by their codes, and NaN compared with anything gives false.

With a symbolic variable the relation is returned unevaluated: ge(x, 1) prints x >= 1.

Input arguments

A, B
Numeric, character or string arrays, or symbolic scalars. Sizes must be compatible (equal, or one is scalar, or broadcasting applies).

Output arguments

C
Logical array with the broadcast size. With symbolic operands, a symbolic relation such as x > 1.

Example

Scalars, arrays and a symbolic relation

ge([1 2 3], 2)
ge('b', 'a')
syms x
ge(x, 1)
Output
ans = 1×3 logical array

   0   1   1
ans = logical
   1
ans = x >= 1

See also

gt le lt ne eq