Computing the Hilbert transform via Fourier transform

AI Thread Summary
The discussion centers around the computation of the Hilbert transform, specifically the expression \widehat{H(f)}=i\textrm{sgn}\hspace{1mm}(k)\hat{f}. A participant inquires about using MATLAB's FFT and IFFT functions for this purpose and asks if there is a command for the signum function. Another participant confirms that the MATLAB command is "sign," which returns an array indicating the sign of each element in the input array. The sign function is described, noting that it outputs 1 for positive values, 0 for zero, and -1 for negative values. Additionally, it is mentioned that for nonzero complex inputs, the sign function computes as X divided by its absolute value. The discussion concludes with a question about the appropriateness of using the sign function for computing the Hilbert transform.
hunt_mat
Homework Helper
Messages
1,798
Reaction score
33
I know the result: \widehat{H(f)}=i\textrm{sgn}\hspace{1mm}(k)\hat{f}

I thought I could use fft, and ifft to compute the transform easily, is there a MATLAB command for sgn?

Mat
 
Physics news on Phys.org
Yes, sign!

sign
Signum function

Syntax
Y = sign(X)

Description
Y = sign(X) returns an array Y the same size as X, where each element of Y is:

1 if the corresponding element of X is greater than zero

0 if the corresponding element of X equals zero

-1 if the corresponding element of X is less than zero

For nonzero complex X, sign(X) = X./abs(X).
 
Is it okay for computing the Hilbert transform?
 

Similar threads

Replies
0
Views
2K
Replies
2
Views
405
Replies
4
Views
3K
Replies
7
Views
2K
Replies
5
Views
2K
Replies
4
Views
3K
Replies
2
Views
2K
Back
Top