Joined: Tue Mar 27, 2007 10:55 pm Posts: 2279 Location: Earth Has thanked: 39 time Have thanks: 61 time
wiener filter implementation
Code:
function ex = wienerFilter(y,h,sigma,gamma,alpha); % % ex = wienerFilter(y,h,sigma,gamma,alpha); % % Generalized Wiener filter using parameter alpha. When % alpha = 1, it is the Wiener filter. It is also called % Regularized inverse filter. % % Reference: Richb's paper % Created: Tue May 4 16:24:06 CDT 1999, Huipin Zhang
% direct implementation of the regularized inverse filter, % when alpha = 1, it is the Wiener filter % Gf = conj(Hf).*Pxf./(abs(Hf.^2).*Pxf+alpha*sigma^2); % % Since we don't know Pxf, the following % handle singular case (zero case) sHf = Hf.*(abs(Hf)>0)+1/gamma*(abs(Hf)==0); iHf = 1./sHf; iHf = iHf.*(abs(Hf)*gamma>1)+gamma*abs(sHf).*iHf.*(abs(sHf)*gamma<=1);