Series (FPScript)

21.09.2021

Forms a data series with linear ascending or descending values.

Syntax

Series(StartingValue, EndValue [ , Increment = 1 ])

 

The syntax of the Series function consists of the following parts:

Part

Description

StartingValue

The first value of the data series.

Permitted data structures are scalar value. All numeric data types are permitted.

EndValue

The value where the data series is to end.

Permitted data structures are scalar value. All numeric data types are permitted. The unit has to be compatible with that of parameter StartingValue.

Increment

Specifies the difference between the consecutive values of the data series.

Permitted data structures are scalar value. All numeric data types are permitted. The unit has to be compatible with that of parameter StartingValue.

If this argument is omitted, it will be set to the default value 1.

Remarks

As the result the function returns a data series of data type 64-bit floating point.

Use the Data Series operator if you want to create data series using other data types as a 64-bit floating point value.

The number of values of the data series corresponds to the (EndValue - StartingValue) / Increment + 1, rounded to the next integer. Since the difference of the EndValue minus StartingValue does not have to be an integral multiple of Increment, it is not guaranteed that the EndValue appears exactly in the data series. StartingValue is, however, always the first value in the data series.

If an argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

Available in

FlexPro Basic, Professional, Developer Suite

Examples

Series(0, 10, 0.001)

Generates a data series with 10001 values. The first value is 0 and the last value is 10.

Series(1, 10.5)

Generates a data series with 12 values. The first value is 1 and the last value is 11.

Series(-1.5, 5.5, 2)

Generates a data series with 5 values. The first value is -1.5 and the last value is 6.5.

Series('1/1/2015', '12/31/2015', '1:00:00:00')

Generates a data series with 365 calendar time values. The first value is '1/1/2015 00:00:00' and the last value is '12/31/2015 00:00:00'.

See Also

StraightLine Function

Data Series Operator

Share article or send as email:

You might be interested in these articles