View raw

1 import numpy as np 2 import matplotlib.pyplot as plt 3 4 t = [0.01 * x for x in range(0, 1001)] 5 y = [-(t + 1) * np.exp(-t) for t in t] 6 7 plt.plot(t, y) 8 plt.xlabel('t (sec)') 9 plt.ylabel('y(t)') 10 plt.title('MAE 171A - Homework 1.5\n Step Response') 11 plt.show() 12