www.pudn.com > speechenhancement.rar > WH.m


function [h,e]=WH(Rss,Rww,M) 
%Compliment Wiener_Hoff Optimal filter 
%Rss denotes auto-correlation of signal and Rww denotes auto-correlation 
%of White noise generated by computer 
%M denotes the point-number of signal 
e1=10;e0=0;N=0;%Value e1,e0 and convice to execute 
while abs(e0-e1)>1e-6 
    N=N+1; 
    e0=e1; 
    Rxs=Rss(M:M+N-1); 
    Rxx=Rww(M:M+N-1)+Rss(M:M+N-1); 
    R_xx=zeros(N); 
    for j=1:N 
        for n=1:N 
            R_xx(j,n)=Rxx(abs(j-n)+1); 
        end 
    end 
    h=inv(R_xx)*Rxs'; 
    e1=Rss(M)-h'*Rxs'; 
end,N 
e=e1;