summaryrefslogtreecommitdiff
path: root/hw3
diff options
context:
space:
mode:
Diffstat (limited to 'hw3')
-rw-r--r--hw3/prob_3.py22
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()
Copyright 2019--2024 Marius PETER