From 8e0ca3c24a8dd2b49edb78b2e92fb7b569958211 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Tue, 23 Jul 2019 17:04:57 -0700 Subject: hw3 --- hw3/prob_3.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 hw3/prob_3.py diff --git a/hw3/prob_3.py b/hw3/prob_3.py new file mode 100644 index 0000000..1004506 --- /dev/null +++ b/hw3/prob_3.py @@ -0,0 +1,22 @@ +import numpy as np +import matplotlib.pyplot as plt +from scipy import signal + +# numH = [] +# denH = +# sysH = signal.TransferFunction(numH, denH) +# impulse = signal.impulse(sysH) + + +num = 1 +den = [1, 2, 2] +sys = signal.TransferFunction(num, den) +t = [0.0001 * t for t in range(60000)] +y = signal.step(sys, t) + + +plt.plot(t, y) +plt.xlabel('t (sec)') +plt.ylabel('y(t)') +plt.title('MAE 171A - Homework 3.3\n Step Response') +plt.show() -- cgit v1.2.3