Multiplication Operator (*) (FPScript)


Multiplies two expressions.


Expression1 * Expression2

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




Any expression. All data types except Boolean values are permitted.


Same as Expression1.


The operator can process scalar values or entire data series and data matrices. If at least one argument is a data series or a data matrix, the multiplication takes place on a per-element basis and the result is once again a data series or a data matrix. If at least one of the two arguments is a data matrix, then both arguments must have the same number of rows. For a different number of columns in data matrices or for a different number of rows in data series, extra columns or values are removed.

If signals, signal series or space curves are multiplied, only their Y components are examined. The result then preferably contains the X component and possibly the Z component of Expression1. Otherwise, it contains those of Expression2. If one of the expressions returns a list, then the operation is executed for each item in the list and the result is also a list.

You can apply the operator to real and complex data types as well as to time spans and strings. For complex arguments, complex multiplication takes place and the result is also complex. 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, integers are converted into floating point values and real numbers converted into complex numbers.

The complex multiplication is defined as (a, b) * (c, d) = (a * c - b * d, a * d + b * c).

You can multiply time spans with numerical values or time span values. Both operands are then interpreted as seconds and the result is a time span value corresponding to the product.

If one argument is numeric and the other is a string, the string is changed to numeric type before the operation. Both arguments cannot be strings.

If at least one of the operands is a quantity, then this also applies to the result, and its unit is formed by multiplying the units of the operands. If an operand has the unit % or ppm (parts per million), then this is transformed to the unit 1 before multiplication.

Available in

FlexPro View, Basic, Professional, Developer Suite


Signal * 1000

Multiplies all Y values in Signal by 1000. The unit remains unchanged.

2000000000n * 2n

Returns the 32-bit integer -294967296, since an overflow has occurred.

Signal(Signal.y, Signal.x * 10.)

Spreads a signal by a factor of 10 in the X direction.

(1., 2.) * (3., 4.)

Returns the complex 64-bit floating point value (-5., 10.).

"1.23" * 2n

Returns the 32-bit integer 2, since the string is changed into the data type of the numeric result. Note that the country-specific decimal symbol set in Windows must be used in the string.

'12:00:00' * 1.5

Returns the time span value '06:00:00 PM'.

1 N * 5 m

Returns 5 N m.

* 5 m

Returns 5 m.

1 V * 5 V

Returns 5 V^2.

1 mV * 5 V

Returns 0.2 mV V.

200 m * 20 %

Returns 200 m * (20 / 100) = 40 m.


See Also

Conjugate-Complex Operator (*)

Share article or send as email:

You might be interested in these articles