MATLAB: Design an ideal High Pass Filter

filtersMATLAB

Hello,
I need to design an ideal high pass filter and a non-ideal high pass filter to compare them. I would filter a signal in the two filters and see the results. I use the Filter Design & Analysis Tool in Matlab but I do not know much about the tool nor how to design an ideal filter. How could design an ideal filter? Which is the best non-ideal high pass filter (realistic filter that have a similar response to an ideal)?
Thanks for the help!

Best Answer

An ‘ideal’ filter has an infinitely steep rolloff (transition region), so as you might expect, it doesn’t really exist. You can approximate it with a FIR filter, but the numerator would be infinitely long. The best you can do is to take an fft (link) of you signal, and just ‘chop’ it at some point. (Note that you have to do this with an fftshift of the fft and do the ‘chop’ at the same positive and negative frequencies, then do the fftshift again and take the ifft of the result.)
The alternative is that your instructor is playing a joke on you. It would be best of you clarified the assignment before going further.