MATLAB Code For Echo Filter
MATLAB Code For Echo Filter
%%%%%%%%%%%% %%%%
% loading the audio files x=y; % x = input Ts = 1/Fs; % sampling period t = 0:Ts:(length(x)/Fs)-Ts; %
% filter output
% subplot(2,1,1) plot(t,x); xlabel('Time (s)'); ylabel('X'); title('Time domain plots of the original signal
Y1 = fft(x); L = length(x);
% Then compute the single-sided spectrum P1 based on P2 and the even-valued signal length L. P2 =
% Define the frequency domain f and plot the single-sided amplitude spectrum P1. f = Fs*(0:(L/2))/L;
figure; subplot(2,1,1) plot(f,P1) title('Single-Sided Amplitude Spectrum of X(t) and Y(t)') xlabel('f (Hz)')
% Define the frequency domain f and plot the single-sided amplitude spectrum P1. f = Fs*(0:(L/2))/L;