Expand (FPScript)

07.02.2018
﻿ Analyzing Data Mathematically > Reference > FPScript Functions > Signal Sampling > Expand

Expand (FPScript)

Analyzing Data Mathematically > Reference > FPScript Functions > Signal Sampling >

Expand (FPScript)

Increases the number of values in a data set.

Syntax

Expand(DataSet, ExpansionFactor)

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

Teil

Beschreibung

DataSet

The data set for which the number of values is to be increased.

All data structures are allowed, except scalar value. All real data types are permitted.

If the argument is a list, then the function is executed for each element of the list and the result is also a list.

ExpansionFactor

A factor that specifies by how much the number of values is to be increased.

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

The value must be greater or equal to 1.

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

Remarks

The result has the same unit as the argument DataSet.

The expansion takes place through linear interpolation, i.e. neighboring values in the DataSet are joined up by a straight line, which is evaluated at the corresponding number of points.

For aggregate data structures, their components are expanded separately. The values in the individual components of DataSet do not have to be increasing or decreasing.

For a data set with a number of values of n, the number of values of the result is:

(n - 1) * ExpansionFactor + 1

Available in

FlexPro Standard, Professional, Developer Suite

Examples

 Expand({1., 3., 5., 7.}, 2) Results in {1., 2., 3., 4., 5., 6., 7.}. Expands the data series by the factor 2. Expand({1., 2., 5., 7.}, 2) Results in {1., 1.5, 2., 3.5, 5., 6., 7.}.

Reduce Function

LinearInterpolation Function

Sample Function

Resample Function

Signal Sampling Analysis Object

Share article or send as email: