I am reading the book "Signals and systems laboratory with MATLAB" by Alex Palamides and I am reading system properties on pg 154 of the book but I am confused about an example shown in attached photo.

I am actually confused in how he is setting or using stem command as i have shown highlighted:

Why he is using stem(-2:7), why not any other range such as stem (-1:8) or stem (-3:6)?

enter image description here

  • $\begingroup$ Because -2:7 determines the X range of the plot. If you are asking why should the focus be on those time instances specifically, then you need to understand a bit more about resampling in general. The short answer is that the first sample in x was obtained at n=0 and that cannot change no matter what resampling you apply to the signal. The way this question is phrased makes it off topic to this board. $\endgroup$ – A_A Apr 11 at 7:31