import matplotlib.pyplot as plt
import numpy as np
import sk_dsp_comm.sigsys as ss
nx = np.arange(-5,10)
x = ss.drect(nx,4)
y,ny = ss.conv_sum(x,nx,x,nx)
plt.stem(ny,y)
plt.show()
#
# Consider a pulse convolved with an exponential. ('r' type extent)
#
h = 0.5**nx*ss.dstep(nx)
y,ny = ss.conv_sum(x,nx,h,nx,('f','r')) # note extents set
plt.stem(ny,y) # expect a pulse charge and discharge sequence
