Hello, I'm trying to cross correlate of two audio files and plot them but the problem is; it doesn't show the 3rd signals when I plot it which is the correlation of the audio files.
[x,fs]=audioread("Word14.wav");[y,fs]=audioread("Word16.wav"); subplot(3,1,1), plot (x); subplot(3,1,2), plot (y); [C1, lag1] = xcorr(x,y); subplot(3,1,3), plot(lag1/fs,C1); ylabel("Amplitude"); grid on title("Cross-correlation ")
it shows me this error:
Second argument must be a vector.
both audio files are 8 seconds duration and have the same sampling frequency.
Best Answer