I want to implement FIR Hilbert transformer filter in Matlab.

  • $\begingroup$ What is your question? So you have designed a FIR Hilbert transformer and now you need to implement it? Then your question would be "how can I implement an FIR filter in Matlab?". Or do you need to design an FIR Hilbert transformer, i.e., find its coefficients? $\endgroup$
    – Matt L.
    Commented Dec 5, 2018 at 8:25
  • $\begingroup$ Sir i want to know that how a filter can be designed in Matlab, if we know about its transfer function in frequency domain. $\endgroup$ Commented Dec 5, 2018 at 9:50

1 Answer 1


From your comment it became clear that you're actually interested in the design of an FIR Hilbert transformer. There are many ways to design a Hilbert transformer, but for you one of the most straightforward ways is probably to use the Matlab function firpm.m with 'ftype' set to 'h' (for Hilbert transformer). This will design an FIR Hilbert transformer with an equiripple behavior (i.e., with the maximum approximation error being minimized). Alternatively, you could use firls.m for a least squares design. If you use firls.m you need to set the filter type 'ftype' to 'hilbert'.

  • $\begingroup$ Thank you sir for your suggestion. This function is working but i want to know how to make it discrete form so that i can apply on a number of sample in Matlab . $\endgroup$ Commented Dec 5, 2018 at 11:02
  • $\begingroup$ @AbhishekShukla: The result is a discrete time filter, i.e., a set of FIR filter coefficients. So you can apply them to any input sequence in Matlab. $\endgroup$
    – Matt L.
    Commented Dec 5, 2018 at 11:03
  • $\begingroup$ Sir I have one more doubt regarding this filter. I want to find the Hilbert transform some data sample but the size of sample is large. When I am doing filtering using this filter it is showing error. Can we design it in terms of sampling frequency ? $\endgroup$ Commented Dec 5, 2018 at 14:17
  • $\begingroup$ @AbhishekShukla: This answer should be helpful. $\endgroup$
    – Matt L.
    Commented Dec 5, 2018 at 14:21
  • $\begingroup$ Matlab scipt of Hilbert Transformer filter :f=[.05,0.95],m=[1,1],'h=firpm(32,f,m,'hilbert'); Sir this code given Hilbert coefficient but how can I use sampling frequency in this method. After that I want to filter random number of sample through this filter. $\endgroup$ Commented Dec 6, 2018 at 11:22

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.