According to Steven W. Smith, in his book: The Scientist and Engineer's Guide to Digital Signal Processing, when designing a digital filter, "Good performance in the time domain results in poor performance in the frequency domain, and vice versa", and one needs to find a good trade-off for one's needs; and from what I understood, bad performance in the time domain means that the signal's waveform will be altered, meaning it will be somehow distorted after going through the filter. Additionally, the filter's step response is of the most importance when it comes to achieving good performance in the time domain. http://www.dspguide.com/CH14.PDF
So, after I designed two filters with matlab that aim to rid a signal from the electromagnetic interference (lowpass), and the DC component (highpass), and thinking that linear phase filters preserve the shape of the signal because all frequency components are shifted equally, so I went with the FIR filter option, and by using the function fircls1 that allows for defining the ripple levels in the passband and stopband, with the former being the concern for preserving the amplitude levels of the different frequency components, I thought I am getting the best possible "time domain" response, and the shape of the waveform in the time domain is as intact as could possibly be, moreover, I used an adequate number of points in the filter kernal to get the roll-off I desired, and after all that I came across that phrase in the first paragraph, this time I paid more attention and said let's have a look at the step response of the filter. Before I was solely concerned about the frequency response, ripple and stopband attenuation, etc.
I am attaching the step responses of my lowpass filter (left) and highpass (filter) right, and I would like to understand, what did I do wrong? I have looked at the filtered signal and it looks good, it is delayed considerably, and I know FIR filters requires longer execution time, but I am working on it offline, as in not in real-time, and I think I optimized the frequency response, as I mentioned, pretty much, so if that phrase means what I think it means, then the signal is not preserved and its waveform is some how distorted, and I cannot have that for the intended application, so could some one please help me make sense of these seemingly contradictory understandings.
Thank you very much!