Concatenation Operator (:) (::) (FPScript)

23.08.2021

Appends strings, scalar values, data series, data matrices, signals, signal series and space curves to one another.

Syntax

Expression1 : Expression2

or

Expression1 :: Expression2

The syntax of the : operator and the :: operator consist of the following elements:

Element

Description

Expression1

Any expression.

Expression2

Any expression.

Remarks

The operation depends on the data structure of the arguments as follows:

Data Structure

Operation

ScalarValue1 : ScalarValue2

If both arguments are strings, then these are appended to one another. If one of the scalar values is empty, then the other one is returned. Otherwise, the result is a data series with both scalar values.

ScalarValue : DataSeries

DataSeries : ScalarValue

If the scalar value is empty, then the data series is returned unchanged. Otherwise, the scalar value is appended to the beginning or the end of the data series.

DataSeries1 : DataSeries2

The two data series are appended to one another.

ScalarValue : DataMatrix

DataMatrix : ScalarValue

If the scalar value is empty, then the data matrix is returned unchanged. Otherwise, the scalar value is used to produce a data series whose number of rows equals the number of rows in the matrix. This data series is then appended as a column to the beginning or end of the matrix.

DataSeries : DataMatrix

DataMatrix : DataSeries

The number of rows of the data series must equal the number of rows in the data matrix. This data series is then appended as a column to the beginning or end of the matrix.

DataMatrix1 : DataMatrix2

The number of rows of the two data matrices must match. The result is a data matrix whose number of columns is equal to that of DataMatrix1 plus DataMatrix2.

Signal1 : Signal2

The result is a signal for which the number of points is equal to that of Signal1 plus Signal2. The X and Y components of the two signals are appended to one another. If the first signal contains at least one point, then the X-component of the second signal is shifted so that it seamlessly follows the first. The signals therefore appear appended to one another.

Signal1 :: Signal2

The result is a signal for which the number of points is equal to that of Signal1 plus Signal2. The X and Y components of the two signals are appended to each other without shifting the X component of the second signal.

SignalSeries1 : SignalSeries2

The result is a signal series whose number of points in the individual signals corresponds to those of SignalSeries1 plus SignalSeries2. The X and Y components of the individual signals are appended to one another. The signals are therefore longer and their count remains the same. The number of signals of the two signal series has to match. If the first signal row contains at least one point, then the X-component of the second row is shifted so that it follows the first seamlessly. The signal series therefore appear appended to one another. If a signal series has a Z component, then it must also apply to the other. In this case, the Z component of Expression1 is copied to the result.

SignalSeries1 :: SignalSeries2

The result is a signal series whose number of points in the individual signals corresponds to those of SignalSeries1 plus SignalSeries2. The X and Y components of the individual signals are appended to each other without shifting the X component of the second signal series.

SpaceCurve1 : SpaceCurve2

The Y, X and Z components of the two space curves are appended to each other.

List1 : List2

Appends the two lists to one another.

List : NoList

NoList : List

Appends the value to the beginning or end of the list.

The result is always of the same data type as the expressions. If the expressions have different data types, then these are adapted to each other in such a way that there is no loss of resolution in the result, i.e. lower resolutions are converted into higher resolutions, and integers are converted to floating point values, real numbers to complex numbers, numbers to calendar times and calendar times to time spans. The string data type cannot be adapted.

Lists are appended to one another. If you want to concatenate them element by element instead, please use the Concatenate function.

If Expression1 and Expression2 is a quantity, then they have to have the same SI dimension and the unit of Expression2 is transformed to the unit of Expression1 before being concatenated. If only one argument is a quantity, then the same unit is used for the other argument.

Available in

FlexPro View, Basic, Professional, Developer Suite

Examples

Signal1 : Signal2

Appends two signals to one another in such a way that the X component remains continuous.

Signal1 :: Signal2

Appends two signals to one another without shifting the X component of the second signal.

Signal(Signal1.y : Signal2.Y, Signal1.X : Signal2.X)

Appends two signals to one another without shifting the X component of the second signal.

DataMatrix1 : DataMatrix2

Appends two data matrices to one another in the direction of the columns.

(Signal(DataMatrix1, 1.) : Signal(DataMatrix2, 1.)).Y

Appends two data matrices to one another in the direction of the rows. To do this, the matrices are transformed temporarily into signal series.

(Signal(SignalSeries1.Y : SignalSeries2.Y, SignalSeries1.X)

Appends two signal series without a Z component to one another in the direction of the columns. To do this, the signal series are transformed temporarily into data matrices.

{ 1 V } : { 300 mV }

Results in the data series { 1 V, 0.3 V }.

 

See Also

Data Structures

Append Statement

Concatenate Function

ConcatenateList Function

Share article or send as email:

You might be interested in these articles