MovingDiff

Moving Difference of a freely definable range.

Syntax

 MovingDiff(expression, # of data points)
  • expression: signal expression
  • # of data points before - integer number of points in the signal expression
  • positive value: before the current date in the aggregation range
  • negative value: after the current date in the aggregation range

The MovingDiff("x" in "unit", # data points) function calculates the difference of the elements within the range defined by the user via number of data points before the actual time step. In case of entering zero data points before and after the output is a copy of the input. Positive and and negative sign define the direction. Positive values define the data points before the actual one, negative values define the number of data points after the actual one.

Example

 MovingDiff("produced water per time increment" in "STB", 1)

As you see in the following table the MovingDiff with 1 data point back in time produces following output based on the 'original signal' as input:

 

Date/Time

 

 

Original Signal

 

MovingDiff
1 datapoint backwards in time

01.02.2007 00:00

8

#NULL!

01.03.2007 00:00

0

-8

01.04.2007 00:00

15

15

01.05.2007 00:00

22

7

01.06.2007 00:00

24

2

01.07.2007 00:00

13

-11

01.08.2007 00:00

27

14

01.09.2007 00:00

6

-21