Frequency response of a (rectangular) integrator A very simple question which can't really figure out:

I have a simple discrete time rectangular integrator with Z transform H(z) = 1/(1-Z^(-1))

Plotting the frequency response with Matlab using freqz shows what it looks like a kind of low pass filter response.

However, when finding the freq response by sending an delta pulse through the integrator via filter Matlab function, and performing the FFT on its output, I just get a pulse (with amplitude equal to number of FFT points) followed of zeroes.

I guess this kind of makes sense mathematically, as the output of the integrator is a step function, which, after FFT, is the addition of as many samples of the step output as the FFT length.

However,


Why does the freqz method does not match the impulse response + FFT approach?
Am I wrong in trying to look at an integrator as a digital filter?


Thanks a mill

PD:
I forgot to mention that this is the closest to this question I could find on the site... However it is a leaky integrator not a rectangular (i.e. feedback multiplier is 1) integrator

Is a leaky integrator the same thing as a low pass filter?
Those are good questions! Here's my "two cents." Hilmar is correct, the integrator is not stable because there's a pole on the z-plane's unit circle. But I'll bet a pint of beer that the region of convergence is outside the pole (and therefore outside the unit circle) because the integrator's impulse response is causal.

Answer to question# 1: Matlab's freqz() command computes the freq response at zero Hz by evaluating a ratio of polynomials at various frequencies. And that ratio has a zero-valued denominator at zero Hz. So freqz() gives a freq mag response of infinity at zero Hz.  The DFT of an impulse response that's a finite-length sequence of ones, evaluated at zero Hz, is merely the sum of the impulse response samples.  The two approaches result in freq magnitude responses that are zero-valued at all frequencies except at zero Hz.  Both approaches give similar results.

Answer to question# 2: You could, if you wish, call an integrator a "filter." But it's unstable, and unstable filters are of no value in trying to filter real-world signals.