# Arbitrary phase FIR filter design

I would like to design an FIR filter using the frequency sampling method with nonlinear phase specifications. For example, between $$0$$ and $$\frac{f_s}{4}$$ a phase of $$180^\circ$$ and between $$\frac{f_s}{4}$$ and $$\frac{f_s}{2}$$ a phase of $$90^\circ$$. The problem I face is that my impulse response in Matlab is complex after calculating the IFFT of the designated frequency response.

How can I make the impulse response real in order to deal with real signals?

2. If you want to use a least square error fit, just split the equations into their real and imaginary parts. I.e. instead having $$N$$ complex equations, you will have $$2N$$ real equations.