MATLAB: 1-D digital filter runtime

filter

Quick question – Is there any computational savings to padding input arrays for the filter function to a power of 2?

Best Answer

  • Not that I’m aware of. It would likely do the opposite. (It could also introduce artefactual ‘ringing’ in the output with a sharp transition to zeros.)
    Also, use the filtfilt function if you have the Signal Processing Toolbox. It has the advantage of not introducing any phase distortion. The filter function does.