Language Reference
TFHILBERT Function
TFHILBERT (x) ;
This function is supported by the IML procedure and the iml action.
The TFHILBERT function returns the analytic signal that corresponds to the input vector x. The analytic signal that corresponds to a continuous time series is the complex time series , where is the Hilbert transform of and . In many applications, replacing the original time series by its analytic transform produces better results (Marple 1999).
If the input vector has n elements, then the output is an matrix whose first column represents the real part of the analytic signal and whose second column represents the imaginary part of the analytic signal.
For a continuous time series with Fourier transform , the Hilbert transform is defined by inverting over the positive frequencies (Cohen 1995, p. 30):
The spectrum of is identical to the spectrum of for positive frequencies, and the spectrum of is 0 for negative frequencies.
The Hilbert transform of a discrete time series is similarly constructed as a time series whose discrete Fourier transform coincides with that of the input time series for positive spectra and vanishes otherwise. The implementation here is based on the method described in Marple (1999).
The following example demonstrates the TFHILBERT function:
x = 1:10;
s = tfhilbert(x);
print s;
Figure 471: Hilbert Transform
| s | |
|---|---|
| 1 | 5.5055277 |
| 2 | -0.649839 |
| 3 | -0.649839 |
| 4 | -2.102924 |
| 5 | -2.102924 |
| 6 | -2.102924 |
| 7 | -2.102924 |
| 8 | -0.649839 |
| 9 | -0.649839 |
| 10 | 5.5055277 |