diff options
author | Marius Peter <blendoit@gmail.com> | 2019-07-23 17:04:57 -0700 |
---|---|---|
committer | Marius Peter <blendoit@gmail.com> | 2019-07-23 17:04:57 -0700 |
commit | 8e0ca3c24a8dd2b49edb78b2e92fb7b569958211 (patch) | |
tree | 5a02bedcf13997ee043ca32f35655f76b437b93a /hw3/prob_3.py | |
parent | feaa9144eb28dd263ef79577ab369174b8c6c83b (diff) |
hw3
Diffstat (limited to 'hw3/prob_3.py')
-rw-r--r-- | hw3/prob_3.py | 22 |
1 files changed, 22 insertions, 0 deletions
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() |