Total members 11791 |It is currently Mon Aug 19, 2019 9:07 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Code:

function ex 
= inverseFilter(y,h,gamma);
%
%
 ex = inverseFilter(y,h,gamma);
%
%
 Generalized inverse filtering using threshold gamma:
%
%
  inv_g(H) = gamma*abs(fft(h))/fft(h), if abs(fft(h)) <= 1/gamma
%  inv_g(H) = inv(H),            otherwise
%
%
 Reference: Lims book
% Created: Tue May 4 16:22:57 CDT 1999, Huipin Zhang

= size(y,1);
Yf = fft2(y);
Hf = fft2(h,N,N);

%
 handle singular case (zero case)
sHf = Hf.*(abs(Hf)>0)+1/gamma*(abs(Hf)==0);
iHf = 1./sHf;

%
lengthzero = length(abs(Hf)==0)
%
 invert Hf using threshold gamma
iHf 
= iHf.*(abs(Hf)*gamma>1)+gamma*abs(sHf).*iHf.*(abs(sHf)*gamma<=1);
ex = real(ifft2(iHf.*Yf));

return
 





Author:
Mastermind
User avatar Posts: 2707
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : Generalized inverse filtering using threshold gamma
 Inverse Transformation for some Statistical Distributions (C     -  



Topic Tags

Matlab Algorithms






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com