# matlab impulse response [closed]

i have a matlab file and i'm trying to understand what's going on.

when i run it, it shows this when i type the command :

this at

and this at

can someone explain to me what increasing the value in does because i can't seem to understand some of what's going on in the graphs.

• I don't know why, but you keep vandalizing your own question. Don't. Full stop. – Marcus Müller Nov 17 '18 at 16:01
• Please see this. – A_A Nov 19 '18 at 9:59

The two top figures show the response of an ideal low pass filter and (the center part of) its corresponding infinitely long impulse response. The bottom figures show the result of windowing the impulse response, i.e., cutting out the $$N$$ center samples and making the rest zero, which gives you a finite length impulse response that can be implemented. You can see that windowing obviously changes the frequency response, but the longer the window is made the better the approximation. However, note that the maximum approximation error (around the discontinuity) always has the same value, regardless of the window length. This is called the Gibbs phenomenon.