Is Hilbert transform not defined for complex signals? In MATLAB, the function hilbert ignores if you give a complex sequence as input. Why?

  • $\begingroup$ A related question, if the input signal is complex, then how to determine the analytic signal in MATLAB? just performing Hilbert operation on real and imag part and then adding the each complex output? $\endgroup$
    – user47274
    Commented Jan 21, 2020 at 19:42

1 Answer 1


The Hilbert transform can be applied to complex functions of a real variable. E.g., the Hilbert transform of the complex exponential $e^{j\omega_0t}$, $\omega_0>0$, is given by


The problem you encounter has to do with Matlab's implementation of the function hilbert.m. It is designed for real-valued input sequences and it will ignore any imaginary part. Note that despite its name this function does not simply return the Hilbert transform of the input vector, but it computes the corresponding analytic signal, i.e. it returns a complex vector, the real part of which is equal to the input vector, and the imaginary part of which is the Hilbert transform of the input vector.

So if for whatever reason you want to compute the Hilbert transform of a complex vector, you need to do the following:

x = ...    % some complex vector
xr = real(x);
xi = imag(x);
xr_ = imag(hilbert(xr));    % Hilbert transform of real part
xi_ = imag(hilbert(xi));    % Hilbert transform of imaginary part
x_ = xr_ + 1i * xi_;        % Hilbert transform of complex vector x
  • $\begingroup$ That is a complete and superb answer. Thanks. @Matt L $\endgroup$ Commented Mar 6, 2016 at 18:23
  • $\begingroup$ @SeethaRamaRaju: You're welcome! Good to know that it was helpful. $\endgroup$
    – Matt L.
    Commented Mar 6, 2016 at 18:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.