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?
조회 수: 2 (최근 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!