Contents
Can you calculate the difference between two signals?
Different lengths prevent you from calculating the difference between two signals but this can easily be remedied by extracting the common part of signals. Furthermore, it is not always necessary to equalize lengths.
How does spectral coherence help identify similarity between signals?
Spectral coherence helps identify similarity between signals in the frequency domain. Large values indicate frequency components common to the signals. Load two sound signals into the workspace. They are sampled at 1 kHz. Compute their power spectra using periodogram and plot them next to each other.
How to find signal similarity in two templates?
The third subplot shows the signal which we want to search for in our database. Just by looking at the time series, the signal does not seem to match to any of the two templates. A closer inspection reveals that the signals actually have different lengths and sampling rates.
How to find the frequency of a sound signal?
Load two sound signals into the workspace. They are sampled at 1 kHz. Compute their power spectra using periodogram and plot them next to each other. Each signal has three frequency components with significant energy. Two of those components appear to be shared. Find the corresponding frequencies using findpeaks.
How to find the delay between two signals?
We can also use the finddelay function to find the delay between two signals. t21 indicates that s2 lags s1 by 350 samples, and t31 indicates that s3 leads s1 by 150 samples. This information can now used to align the 3 signals by time shifting the signals.
Is it safe to cross correlation between two signals?
Cross-correlation can be performed between signals with different lengths, but it is essential to ensure that they have identical sampling rates. The safest way to do this is to resample the signal with a lower sampling rate.