h =
hilbert (f, N, dim)
¶Analytic extension of real valued signal.
h = hilbert (f)
computes the extension of the real
valued signal f to an analytic signal. If f is a matrix,
the transformation is applied to each column. For N-D arrays,
the transformation is applied to the first non-singleton dimension.
real (h)
contains the original signal f.
imag (h)
contains the Hilbert transform of f.
hilbert (f, N)
does the same using a length N
Hilbert transform. The result will also have length N.
hilbert (f, [], dim)
or
hilbert (f, N, dim)
does the same along
dimension dim.
The following code
## notice that the imaginary signal is phase-shifted 90 degrees t=linspace(0,10,256); z = hilbert(sin(2*pi*0.5*t)); grid on; plot(t,real(z),';real;',t,imag(z),';imag;');
Produces the following figure
Figure 1 |
---|
The following code
## the magnitude of the hilbert transform eliminates the carrier t=linspace(0,10,1024); x=5*cos(0.2*t).*sin(100*t); grid on; plot(t,x,'g;z;',t,abs(hilbert(x)),'b;|hilbert(z)|;');
Produces the following figure
Figure 1 |
---|
Package: signal