Standard Library function that constructs aHilbert transformation matrix.
d (optional) A flag to indicate the direction of rotation:
A Hilbert series has the interesting property that the correlation between it and its own Hilbert transform is mathematically zero.
The HILBERT function generates a Hilbert matrix by generating the Fast Fourier Transform of the data with the FFT function and shifting the first half of the transform products by +90 degrees and the second half by -90 degrees. The constant elements of the transform are not changed.
The shifted vector is then submitted to the FFT function for the transformation back to the "time" domain. Before it is returned, the output is divided by the number of elements in the vector to correct for the multiplication effect characteristic of the FFT algorithm.
a = FINDGEN(1000) sine_wave = SIN(a/(MAX(a)/(2 * !pi)))
PLOT, sine_wave
OPLOT, HILBERT(sine_wave, -1)
rand = RANDOMN(seed, 1000) * 0.05
PLOT, rand
sandwich = [sine_wave, rand, sine_wave]
PLOT, sandwich, XStyle=1
OPLOT, HILBERT(sandwich, -1)