waveFile='whatMovies.wav'; au=myAudioRead(waveFile); % Filter parameters delay=0.2; gain=0.8; a = [1]; b = [1, zeros(1, round(delay*au.fs)-1), gain]; y = filter(b, a, au.signal); % Plot the result time = (1:length(au.signal))/au.fs; subplot(2,1,1); plot(time, au.signal); title('Original signal x[n]'); subplot(2,1,2); plot(time, y); title('Filter output y[n]'); au.signal=y; myAudioWrite(au, 'echo01.wav'); % Save the output signal