function H=Homomorfic(Y,N,n,db,varargin)
D=log(Y);
FD = fft(D,N);
%% 
%Type of fliter
rechaso=10.^(-db/20);
filter=ones(size(FD));
filter((2+n):(end-n))=ones(size(filter((2+n):(end-n))))*rechaso;

%%
%use of filter
FD=FD.*filter;
D=ifft(FD,N);
D=D(1:length(Y));
H=exp(D);

%%
if ~isempty(varargin)
    subplot(211)
    plot(filter,'.')
    subplot(212)
    plot(Y)
    hold on
    plot(H,'r')
    hold off
    if varargin{1}
        H=filter;
    end
end