PLEASE HELP! NEED THE MATLAB CODE AND PLOT!!!! Problem 2 (25 Points). An echo ca
ID: 2291489 • Letter: P
Question
PLEASE HELP! NEED THE MATLAB CODE AND PLOT!!!!
Problem 2 (25 Points). An echo can easily be generated using a filter of the form: vin] = ayin-D] + zin] where n is the input sequence, yln is the output sequence, D- TF. is the delay in sampling interval gwen the delay T in seconds and sampling rate Fs and ? is an attenuating factor. Using MATLAB's sound file "handel" which has a sampling rate of F. tem using (1) with ?-07, and T-500ms. Your MATLAB implementation should play the original handel sound and the filtered version with a brief pause between them. Note: You can load sound waveform "handel into an array x and listen to it using the "sound" or the "waveplay" functions in MATLAB.Explanation / Answer
filename : ecomake.m
---------------------------------------
load handel.mat %load data of handel file
yn=zeros(4096,1)'; %create initial matrixsetting D=500x1000x8192=4096
for i=1:size(y,1)
yn=[yn,0.7*yn(i)+y(i)]; % eco filter
end
yn=yn(4097:size(yn,2))'; %remove leading zeroes created earlier
disp('playing original audio...')
sound(y,Fs)
pause(15) %giving delay
disp('playing eco...')
sound(yn,Fs)
------------------------------------
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.