Constructively adding sound waves

3 ビュー (過去 30 日間)
Edward  Jones
Edward Jones 2017 年 10 月 12 日
回答済み: The Matlabinator 2017 年 10 月 12 日
I want to generate a code to zero a sound wave at a particular point, then add together a series of sound waves. The problem I have is extracting the same point to zero for multiple sound waves, as some waves have data where others do not? Any help would be much appreciated.

回答 (1 件)

The Matlabinator
The Matlabinator 2017 年 10 月 12 日
Hi Edward,
You may want to look into the Matlab cross-correlation function xcorr. You can call it with two output arguments to get a lag that will give you the time delay required to align the signals. Then, you can subtract the lagged signals such that they equal roughly zero. For example:
a = Signal1;
b = Signal2;
[r,lags] = xcorr(a,b);
% where r is the cross correlation coefficient and lags is the shift required to align the signals
You can then use the "lags" variable to delay one of your signals such that they are aligned. You may need to zero-pad your signals so you can shift them appropriately.

カテゴリ

Help Center および File ExchangeMeasurements and Spatial Audio についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by