# ge, >=

Determine whether real-world value of one array is greater than or equal to another

## Syntax

``A >= B``
``ge(A,B)``

## Description

example

````A >= B` returns a logical array with elements set to logical `1` (`true`) where the real-world values of `A` is greater than or equal to `B`, when `A` or `B` is a `fi` object. Otherwise, the element is logical `0` (`false`). The test compares only the real part of numeric arrays.In relational operations comparing a floating-point value to a fixed-point value, the floating-point value is cast to a fixed-point type that preserves the relative order of the value with respect to the value in the fixed-point `fi` object.```

example

````ge(A,B)` is an alternate way to execute `A >= B`, but is rarely used.```

## Examples

collapse all

Use the `ge` function to determine whether the real-world value of one `fi` object is greater than or equal to another.

```a = fi(pi); b = fi(pi, 1, 32); b >= a```
```ans = logical 0 ```

Input `a` has a 16-bit word length, while input `b` has a 32-bit word length. The `ge` function returns `0` because after quantization, the value of `a` is slightly greater than that of `b`.

When comparing a double to a `fi` object, the floating-point double is cast to a type that preserves the relative order of the value with respect to the value in the fixed-point `fi` object. This behavior allows relational operations to work between `fi` objects and floating-point constants without introducing floating-point values in generated code.

```a = fi(pi); b = pi; ge(a,b)```
```ans = logical 1```

## Input Arguments

collapse all

Operands, specified as scalars, vectors, matrices, or multidimensional arrays. Inputs `A` and `B` must either be the same size or have sizes that are compatible. For more information, see Compatible Array Sizes for Basic Operations.

Data Types: `single` | `double` | `int8` | `int16` | `int32` | `int64` | `uint8` | `uint16` | `uint32` | `uint64` | `fi`
Complex Number Support: Yes

## Version History

Introduced before R2006a

expand all