GlobalMaximum (FPScript)

21.09.2021

Searches for the global maximum in a data set.

Syntax

GlobalMaximum(DataSet [ , Operation = EVENT_DEFAULT ])

 

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

Part

Description

DataSet

The data set to be searched.

Permitted data structures are data series, data matrix, signal und signal series. 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.

Operation

Specifies the way the function operates. If you omit the argument, the function for data series and signals provides the index of the found maximum as a scalar value. For data matrices and signal series, EVENT_SETVOID is used in this case.

The argument Operation can have the following values:

Constant

Meaning

EVENT_INDEX

The indices of the values or points meeting the condition are placed in the result data set.

EVENT_EXTRACT

Only the points or values meeting the condition are transferred into the result data set.

EVENT_SETVOID

The points or values that do not meet the condition are also included in the result data set, but there they are marked as void.

EVENT_DEFAULT

Corresponds to EVENT_SETVOID if a data matrix or signal series is present, and otherwise EVENT_INDEX.

+ EVENT_COMPLEMENT

This constant can be optionally added and then reverses the selected operation. Then, for example, for EVENT_EXTRACT, the points that do not meet the condition are copied.

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.

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

Remarks

The global maximum is the highest value in the data set. The GlobalMaximum function returns the location of the global maximum. Use the Maximum function with the CALC_GLOBAL option to get the value of the global maximum. If several such values exist, only the first value is recognized as a global maximum. Use the GlobalExtrema function if you want to find all occurrences in this case.

Available in

FlexPro Basic, Professional, Developer Suite

Examples

GlobalMaximum({1,4,3,7,4,5})

Results in 3L. The result is the index of the highest value as a scalar value.

GlobalMaximum({1,4,3,7,4,5}, EVENT_INDEX)

Results in {3L}. The result is the index of the highest value as a data series.

See Also

GlobalMinimum Function

GlobalExtrema Function

NextGlobalExtremum Function

Maximum Function

Event Isolation Analysis Object

Share article or send as email:

You might be interested in these articles