%[x,fs] = wavread('c:\matlab\work\waed.wav');%read your waed.wav 
x = d;
fs = sr;
% Calculate the number of samples in the file
xlen = length(x);  %Initialize all constants       
a = 0.5; 
delay = 0.4;  
D = delay*fs;   
% create a matrix , the size of x for efficient and speedier operation  
y = zeros(size(x)); % filter the signal  
for i   = D + 1 : 1 : xlen;  
       y(i) = x(i) + a*x(i-D);  
end;  
sound(y, fs);   %play the echo signal  
plot(y)  % add labels on plot…use xlabel and ylabel 
f=fft(y);  % get the fast fourier transform of sound file 
whos    % checks the variables used and the size check out f 
plot(abs(f)) %plot magnitude of the fft(frequency content of speech) 
plot(abs(f(1:50000))) % plots a section of the fft

