Skip to main content

Output of h[n] = n (−2 ≤ n ≤ 2)

Short answer

Aligning x[0]=-0.25 and h[0]=0, convolution by shifting and summing gives y[n]={-2,-0.5,0.25,3,1.75,0,-0.5,-1.5,0.5,-1} with y[0]=3, for -3≤n≤6.

A discrete time LTI system is defined by the impulse response h[n] = n for −2 ≤ n ≤ 2; 0 otherwise, i.e. h[n] = {−2, −1, 0, 1, 2}. If the input to the given system is x[n] = {1, −0.25, 0, −1, 0.5, −0.5} (↑ at −0.25, i.e. x[0] = −0.25), find and plot the output of the system.

Given:

  • h[n]={−2,−1,0↑,1,2}h[n] = \{-2, -1, \underset{\uparrow}{0}, 1, 2\} for −2≤n≤2-2 \le n \le 2.
  • x[n]={1,−0.25↑,0,−1,0.5,−0.5}x[n] = \{1, \underset{\uparrow}{-0.25}, 0, -1, 0.5, -0.5\} for −1≤n≤4-1 \le n \le 4.
y[n]=∑kx[k] h[n−k]y[n] = \sum_k x[k]\,h[n-k]

Output range: start =−1+(−2)=−3= -1 + (-2) = -3; length =6+5−1=10= 6 + 5 - 1 = 10; so −3≤n≤6-3 \le n \le 6.

Tabular method

Each row is x[k]x[k] times hh shifted to start at n=k−2n = k - 2:

Rown=−3n=-3n=−2n=-2n=−1n=-1n=0n=0n=1n=1n=2n=2n=3n=3n=4n=4n=5n=5n=6n=6
x[−1] h[n+1]x[-1]\,h[n+1]-2-1012
x[0] h[n]x[0]\,h[n]0.50.250-0.25-0.5
x[1] h[n−1]x[1]\,h[n-1]00000
x[2] h[n−2]x[2]\,h[n-2]210-1-2
x[3] h[n−3]x[3]\,h[n-3]-1-0.500.51
x[4] h[n−4]x[4]\,h[n-4]10.50-0.5-1
y[n]y[n]-2-0.50.2531.750-0.5-1.50.5-1

Sample working:

  • y[−3]=x[−1]h[−2]=1(−2)=−2y[-3] = x[-1]h[-2] = 1(-2) = -2
  • y[0]=x[−1]h[1]+x[0]h[0]+x[1]h[−1]+x[2]h[−2]=1+0+0+2=3y[0] = x[-1]h[1] + x[0]h[0] + x[1]h[-1] + x[2]h[-2] = 1 + 0 + 0 + 2 = 3
  • y[2]=x[0]h[2]+x[1]h[1]+x[2]h[0]+x[3]h[−1]+x[4]h[−2]=−0.5+0+0−0.5+1=0y[2] = x[0]h[2] + x[1]h[1] + x[2]h[0] + x[3]h[-1] + x[4]h[-2] = -0.5 + 0 + 0 - 0.5 + 1 = 0

Sum check: (∑x)(∑h)=(−0.25)(0)=0(\sum x)(\sum h) = (-0.25)(0) = 0, and −2−0.5+0.25+3+1.75+0−0.5−1.5+0.5−1=0-2 - 0.5 + 0.25 + 3 + 1.75 + 0 - 0.5 - 1.5 + 0.5 - 1 = 0.

Answer:

y[n]={−2, −0.5, 0.25, 3↑, 1.75, 0, −0.5, −1.5, 0.5, −1}y[n] = \{-2,\ -0.5,\ 0.25,\ \underset{\uparrow}{3},\ 1.75,\ 0,\ -0.5,\ -1.5,\ 0.5,\ -1\}

for −3≤n≤6-3 \le n \le 6.

Plot

Stem plot drawn sideways (each # = 0.25; left of | is negative):

  n   y[n]
 -3  -2.00  ########|
 -2  -0.50        ##|
 -1   0.25          |#
  0   3.00          |############
  1   1.75          |#######
  2   0.00          |
  3  -0.50        ##|
  4  -1.50    ######|
  5   0.50          |##
  6  -1.00      ####|
nn−3−2−10123456
y[n]y[n]−2−0.50.2531.750−0.5−1.50.5−1

✓ Answer checked by Claude Opus 5.5 (high effort)

All Signals and Systems chapter 6 questions →