Next  |  Prev  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Matlab hilbert() function

The Matlab Hilbert function returns an analytic signal given its real part.

Nh = M-2; % This looks best
delta = [1,zeros(1,Nh)]; % zero-centered impulse
hh = hilbert(delta); % zeros negative-freq FFT bins
Hh = fft(hh); % FIR frequency response
\epsfig{file=eps/MatlabHilbertFR.eps,width=6in}
Looks pretty good, but let's zero-pad the impulse response to interpolate the frequency response:
hhzp = [hh(Lh/2+1:Lh), zeros(1,N-Lh), hh(1:Lh/2)];
Hhzp = fft(hhzp); % Frequency response
\epsfig{file=eps/MatlabHilbertInterpFR.eps,width=5.5in}
\epsfig{file=eps/MatlabHilbertInterpZoomFR.eps,width=5.5in}

Problems:

In general, any real signal given to hilbert() must be interpreted as precisely one period of a periodic signal.


Next  |  Prev  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

[Comment on this page via email]

``The Window Method for FIR Digital Filter Design}'', by Julius O. Smith III, (From Lecture Overheads, Music 421).
Copyright © 2020-06-27 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA  [Automatic-links disclaimer]