Maximum (FPScript)

21.09.2021

Determines individual, floating or block maxima for a data set.

Syntax

Maximum(DataSet, [ Mode = PROCESS_COLUMNS ] [ , IntervalWidth ])

 

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

Part

Description

DataSet

The data set to be evaluated.

All data structures are allowed. All numeric data types are permitted.

For complex data types the absolute value is formed.

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

Mode

Specifies how data matrices and signal series are to be processed and whether individual, floating or block maxima are to be determined. If you omit the argument, individual maxima are determined column by column.

The argument Mode can have the following values:

Constant

Meaning

PROCESS_COLUMNS

Processing takes place column by column. The result contains one value per column.

PROCESS_ROWS

Processing takes place row by row. The result contains one value per row.

PROCESS_COMPLETE

Processing is done globally. The result contains one value for the whole data set.

...plus an optional constant that determines the calculation method:

Constant

Meaning

+ CALC_BLOCK

Block-by-block calculation. One value is calculated per interval.

+ CALC_MOVING

Moving calculation. For every value in the data set, a result is determined in the specified interval.

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

IntervalWidth

This argument is required to determine floating and block maxima. The interval width then specifies the number of values to be examined. The width should be an odd number. Otherwise, the interval is asymmetrical and, to the right of the center, one more value than on the left is included in the search.

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

If DataSet is a scalar value, it is returned unchanged. For signals and signal series, the Y component is processed and the X or Z component is copied, if possible. When calculating floating and block maxima, the data structure of the result corresponds to that of the argument. If, on the other hand, DataSet is a data series or a signal, the result is a scalar value with the maximum searched for. Otherwise, the result is a data series or a signal with one maximum per column or row.

Available in

FlexPro View, Basic, Professional, Developer Suite

Examples

Maximum({4, 6})

Results in 6.

Maximum({4, 6, 9, 3, 5, 4})

Results in 9.

Maximum({4, 6, 9, 3, 5, 4}, PROCESS_COLUMNS + CALC_MOVING, 3)

Results in {6, 9, 9, 9, 5, 5}.

Maximum({4, 6, 9, 3, 5, 4}, PROCESS_COLUMNS + CALC_BLOCK, 3)

Results in {9, 5}.

See Also

Minimum Function

Range Function

GlobalMaximum Function

Statistical Quantity Analysis Object

Share article or send as email:

You might be interested in these articles