Within the Waves application in TekDrive, you can use Real-Time Expressions to transform your data. This allows you to make changes and calculations on your data without having to export your data to another application.

### Rounding Decimals

Round the number of decimal places in a data stream to something more readable.\

**Syntax:** *=math.round([data stream], numberDecimalPlaces)*

Example: *=math.round([voltage], 1)*

### Unit Conversion

Apply a unit conversion to each value in a selected data stream. You can find the complete list of supported units here.

**Syntax:** *=convert([data stream], "fromUnit", "toUnit")*

Example: *=convert([temp_f], "f", "c")*

### Filter Out Unwanted Data

Filter out unwanted data by removing specific data points and/or ranges of data values. The filter operation utilizes the real-time expression comparison operators (!==, ==, <, <=, >, >=). Comparison operations can be chained together to apply multiple filters.

**Single Filter**

**Syntax:** *=[data stream] <operator> <value>*

Example: *=[pitch] < 3*

**Multiple Filters**

**Syntax:** *=[data stream] <operator1> <value1> <operator2> <value2> <operator3><value3> *

Example: *=[pitch] < 3 != 2.64*

### Search Inside a Data Stream

Search for and mark specific values or ranges inside a data stream in Waves.

**Single Condition**

**Sytax: ***=[data stream] <operator> <value>*

Example: *=[voltage] > 10*

**Multiple Conditions**

**Syntax: ***=[data stream] <operator1> <value1> <operator2> <value2> <operator3><value3> *

### Smooth Out a Noisy Signal

Apply a smoothing filter on a numerical data stream viewed as a line graph.

**Default Smoothing (assumed of a smooth factor of 0.7)**

**Syntax: ***=smooth([data stream])*

Example: *=smooth([gyro_x])*

**Specific Smooth Factor**

**Syntax: ***=smooth([data stream], smoothFactor)*

Example: *=smooth([gyro_x], 0.9)*

### Mathematically Combine Multiple Data Streams

Real-time expressions allow any number of signal combinations to be inputted into a given mathematical transformation.

**Syntax:** *=[signal1]+[signal2]*

Example: *=[temperature]-((100-[humidity])/5)*

### Merge Multiple Data Streams Into One

Merge the data points of multiple data streams into a single data stream. This operation is like interleaving the individual data points from each data stream together. This operation uses the timestamp of each data point to create a single, merged data stream. If there are two or more data points with the same timestamp, the leftmost specified data stream will take precedence.

**Merge Two Signals Into One**

**Syntax:** *=[signal1] | [signal2] *

Example: *=[status] | [Switch]*

**Merge Multiple Signals Into One**

**Syntax:** *=[signal1] | [signal2] | [signal3] | ... *

### Cumulative Sum

math.sum performs a cumulative sum of numerical values in a data stream.

**Syntax:** *=math.sum([data stream])*

### Mean

math.mean performs a cumulative average of numerical values in a data stream.

**Syntax: ***=math.mean([data stream])*

### Delta

math.delta calculates the change in value between adjacent numerical values in a data stream.

**Syntax: ***=math.delta([data stream])*

### Time Delta

math.timeDelta calculates the change in time between adjacent data points in a data stream. The "unit" can be "ns", "us", "ms", "sec", "min", "hr", "day".

**Syntax:***=math.timeDelta([data stream], "unit")*

### Derivative

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. The "unit" can be "ns", "us", "ms", "sec", "min", "hr", "day".

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

### Variance

math.variance calculates the cumulative variance of numerical values in a data stream.

This is equivalent to *=math.mean([data stream]^2) - math.mean([data stream])^2. *

**Syntax:** *=math.variance([data stream])*

### Standard Deviation

math.stdDev calculates the cumulative (population) standard deviation of numerical values in a data stream. This is equivalent to *=math.sqrt(math.variance([data stream]).*

**Syntax: ***=math.stdDev([data stream])*