### Overview

math.timeDerivative calculates the change in value between adjacent data points divided by the change in time between adjacent data points in a data stream.

### Syntax

*=math.timeDerivative([data stream], "unit")*

where "unit" can be "ns", "us", "ms", "sec", "min", "hr", "day"

### Example

data_stream values = (1, 23, 43) with

timestamps (2017-06-13T15:48**:05**Z, 2017-06-13T15:48**:16**Z, 2017-06-13T15:48**:21**Z)

(timestamp 1 and 2 are 11 seconds apart, timestamps 2 and 3 are 5 seconds apart)

*=math.timeDelta([data_stream], "sec")*

creates a new data stream = ( (23-1)/11, (43-23)/5 ) = (2, 4)

## Comments

0 comments

Article is closed for comments.