# How to implement Discrete time FIR Hilbert transformer filter?

I want to implement FIR Hilbert transformer filter in Matlab.

• 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? – Matt L. Dec 5 '18 at 8:25
• Sir i want to know that how a filter can be designed in Matlab, if we know about its transfer function in frequency domain. – Abhishek Shukla Dec 5 '18 at 9:50

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'.