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 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
anjali parashar
le 8 Avr 2013
Commenté : jose manuel torres mandujano
le 7 Juin 2016
[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 commentaires
Réponse acceptée
Youssef Khmou
le 8 Avr 2013
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 commentaires
jose manuel torres mandujano
le 7 Juin 2016
how you are able to listen that? my case is that my wav files doesnt have the same Fs
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Audio Processing Algorithm Design dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!