RANGE function

Synopsis
This function creates a numeric array that increases or decreases linearly, based on a starting value and a slope.
Variations
RANGE(Start, Count)
Returns an array, incrementing the previous element's value by one at each index.
Parameters
Start

Specifies the value of the first element of the array.

Supported types: Numeric.
Count

Specifies the number of elements to add to the array.

Supported types: Numeric.
Returns
Returned types: Numeric array.
Examples
1.

The following example returns an array of 6 elements starting at 50. The function returns [50, 51, 52, 53, 54, 55].

RANGE(50, 6)
2.

This example generates an array with the values from 0 to 255. If applied to an 8-bit image as a lookup table (LUT), the image remains unchanged.

RANGE(0, 256)
RANGE(Start, Step, Count)
Returns an array, incrementing the previous element's value by the Step parameter's value at each index.
Parameters
Start

Specifies the value of the first element of the array.

Supported types: Numeric.
Step

Specifies the interval between values added to the array.

Supported types: Numeric.
Count

Specifies the number of elements to add to the array.

Supported types: Numeric.
Returns
Returned types: Numeric array.
Examples
1.

The following example returns [10, 12.5, 15].

RANGE(10, 2.5, 3)
2.

This example returns [2, 0, -2, -4, -6].

RANGE(2, -2, 5)
3.

This example generates an array with the values from 0 to 255. If applied to an 8-bit image as a lookup table (LUT), the image remains unchanged.

RANGE(0, 1, 256)
4.

This example generates an array with the values from 0 to 255. If applied to an 8-bit image as a lookup table (LUT), the image's intensity values are inverted.

RANGE(255, -1, 256)