MMedian('Expression', 'WindowInterval', 'UpdateInterval=timebase', ' Reset=0')

Arguments

'Expression'

Measured value, for which the median is formed

'WindowInterval'

Specification in seconds of the interval length over which the median should be calculated; must be a multiple of 'UpdateInterval'.

'UpdateInterval'

Optional parameter (default = time base); specifies in which cycle the calculation is performed.

'Reset’

Optional parameter (default = 0) to stop and restart the calculation:

'Reset' = 0

Perform calculation

'Reset' = 1

Stop calculation, delete all buffered data and set result to 0

'Reset' = 2

Stop calculation, delete all buffered data and keep result

Description

This function returns the median of 'Expression' every 'UpdateInterval' seconds based on a floating window of 'WindowInterval' seconds.

The 'UpdateInterval' parameter is optional. If not specified then it is set equal to the time base of the function (i.e. as small as possible).

'WindowInterval' must be a multiple of 'UpdateInterval'. Otherwise, 'WindowInterval' is automatically changed to the first multiple of 'UpdateInterval' greater than or equal to 'WindowInterval.'

'WindowInterval' and 'UpdateInterval' can be determined by expressions. Changes of these interval values are applied not until a reset.