i am adding two sound waves. i am receiving an error : ??? Error using ==> plus Matrix dimensions must agree. how i can add these two waves?
1 次查看(过去 30 天)
显示 更早的评论
[y,fs,nbits]=wavread('C:\Users\HP\Desktop\angel_48k_stereo.wav');
[z,fs,nbits]=wavread('C:\Users\HP\Desktop\keyboard_48k.wav');
signal=y+z;
0 个评论
采纳的回答
Youssef Khmou
2013-4-8
hi,
The error occurs because y and z do not have the same length, try :
[y,fs,nbits]=wavread('C:\Users\HP\Desktop\angel_48k_stereo.wav');
[z,fs,nbits]=wavread('C:\Users\HP\Desktop\keyboard_48k.wav');
ny=length(y);
nz=length(z);
N=min([ny nz]);
Y=y(1:N);
Z=z(1:N);
signal=Y+Z;
do they have the same Fs?
3 个评论
jose manuel torres mandujano
2016-6-7
how you are able to listen that? my case is that my wav files doesnt have the same Fs
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio Processing Algorithm Design 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!