Another method signals can be combined is by subtracting the amplitude of one signal from another signal. When working with signals (or arrays in Matlab) this is accomplished using element-wise subtraction. For the signals, and , subtracting from results in the signal:
Audio engineers use this operation to perform a “null test”. This test is used to determine if two signals are identical to each other. If the signals are identical, then by subtracting one from the other the result is a signal with an amplitude of zero.
Next, let’s use the multiplication operator to combine signals together.