## Difference

Purpose

Description

Macro Synopsis

Modules

Related Functions

### Purpose

Difference of two signals

### Description

"Difference" computes the difference of two signals x1 and x2:

"Difference" is implemented as a macro function using Sum and Rescale.
**Warning:** *Note that if the input signals have different x-axis scales (sampling periods), the signal with the largest scale will be adapted automatically by interpolating between successive sample points. The type of interpolation can be set in the Basic Options menu.*

### Macro Synopsis

`y = Diff([x1,x2]);`

signal x1,x2,y;

### Modules

Student, Professional

### Related Functions

Sum, Add constant, Product,
Rescale, Quotient, Reciprocal.