1
$\begingroup$

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

$\endgroup$

closed as off-topic by lennon310, Peter K. May 1 at 12:42

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "General programming questions are off-topic here, but can be asked on Stack Overflow." – lennon310, Peter K.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\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