%PROJECT: AUDIO SIGNAL PROCESSING
%IMPLEMENTATION OF ECHO EFFECT IN THE AUDIO SIGNAL
%echo FUNCTION
%PROJECT BY:
function y = echo1_m();
[x,fs,nbits]=wavread('wav_2.wav');%read in wav file
xlen=length(x);%Calc. the number of samples in the file
a=0.5;
R=ceil(fs*100e-3);
y=zeros(size(x));
d=zeros(size(x));
% filter the signal
for i=1:1:R+1
y(i) = x(i);
end
for i=R+1:1:xlen
y(i)= x(i)+ a*x(i-R);
d(i)= a*x(i-R);
end
[X,map]=imread('C:\Documents and Settings\湘儿\桌
面\12316051462008412153816252141\wavelet-matlab\wide area\Aral Sea-
[Link]');
X1=X;
map1=map;
subplot(221);
image(X1);
colormap(map1);
title('lina');
axis square
[X,map]=imread('C:\Documents and Settings\湘儿\桌
面\12316051462008412153816252141\wavelet-matlab\wide area\[Link]');
X2=X;
map2=map;
subplot(222);
image(X2);
colormap(map2);
title('couple');
axis square
[c1,s1]=wavedec2(X1,2,'sym4');
sizec1=size(c1);
for i=1:sizec1(2)
c1(i)=1.2*c1(i);
end
[c2,s2]=wavedec2(X2,2,'sym4');
c=c1+c2;
c=0.5*c;
xx=waverec2(c,s1,'sym4');
subplot(223);
image(xx);
title('融合图象');
axis square