Numerical implementation of Hilbert transform
7 views (last 30 days)
Show older comments
I have been trying to implement the Hilbert transform numerically but I have been having some trouble. The way I decided to do it is the use of Fourier transforms. The fourier transform of the Hilbert transform of f(x) is -i*sgn(k)*F(k), where F(k) is the Fourier transform of f(x).
I have written my own Fourier and inverse Fourier routines but I don't get nice results. Can anyone suggest anything? The picture (pdf) I have included shows my computational result and the value which it should be.
11 Comments
Walter Roberson
on 1 Aug 2016
Mat, you are free to call anything you want a "Fourier transform", and to refuse to acknowledge anything other people call a "Fourier transform" as being what you would call a Fourier transform. But if you do so, then we have no common ground and you are going to need to solve the problem yourself.
The transform invented by Jean-Baptiste Joseph Fourier does not require a "k". There are alternative formulations that involve "k" and those formulations make it easier to approach various computations, but they are not the only possibilities.
fft() and ifft() do not implement the Fourier Transform: they implement the Fast Fourier Transform, and the Inverse Fast Fourier Transform, which are implementations of Discrete Fourier Transforms. The Symbolic Toolbox implements the (continuous) Fourier Transform http://www.mathworks.com/help/symbolic/fourier.html, and does so without explicit reference to the variables you indicate as being required. When I look at your code, I am pretty much certain that you are not interested in the continuous Fourier Transform and are instead interested in a Discrete Fourier Transform. However, I have only been reading code for 40 years so I could be mistaken.
Answers (0)
See Also
Categories
Find more on Transforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!