Multiply Operator (#) (FPScript)

23.08.2021

Multiplies a value by a given number.

Syntax

Value # Number

The syntax of the # operator consists of the following elements:

Element

Description

Value

The value to be multiplied.

Number

The number(s) by which the value is to be multiplied.

Remarks

This operator is often used to set up data series and data matrices. If you specify the value as Constant, its notation determines the data type of the result.

If Value is a scalar value, the result is a data series containing the scalar value Number times. If Value is a data series, the result is a data matrix containing the data series Number times. If Value is a signal, only the Y component is multiplied and the X component is copied into the result. The result is a signal series.

If Value is a scalar value, then Number can also be specified as a data series with up to two values. In this case, several multiply actions are performed consecutively. If the data series is empty, then the Value is returned unchanged. This variant is suitable for creating a new data set that is to have the same size and number of dimensions as a data set that already exists.

All data types except the Empty data type are permitted for the Value argument. The Number argument must be a real scalar value greater than or equal to zero, and any possible fractional digits are ignored.

If Value and/or Number is a list, then its elements are processed and the result is also a list.

If Value is a quantity, then its unit is taken and the result is also a quantity. If Number is a quantity, then it has to have the SI dimension 1 and it will be transformed to the unit 1 before multiplication.

Available in

FlexPro View, Basic, Professional, Developer Suite

Examples

0. # 100n

Generates a data series with 100 64-bit floating point values 0.

0. # 0n

Generates an empty data series of 64-bit floating point values. Here, the left operand specifies only the data type.

1.s # 100n # 10n

Generates a data matrix of 10 data series, each with 100 32-bit floating point values 1.s.

TRUE # Shape(Matrix)

Generates a matrix of Boolean values whose number of columns and rows corresponds to an existing matrix.

1 mm # 10n

Generates a data series with 10 64-bit floating point values 1 and the unit mm.

# 2 Pi

Generates a data series with 6 values, since the unit Pi has the SI dimension 1 and 2 Pi transformed to the unit 1 results in 6.2831853 and is rounded to 6.

 

See Also

Data Structures

Bundle Operator

Data Series Operator

Shape Function

Signal Function

Polarity Sign Operator (#)

Share article or send as email:

You might be interested in these articles