summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw2/prob_1.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/hw2/prob_1.py b/hw2/prob_1.py
new file mode 100644
index 0000000..615d855
--- /dev/null
+++ b/hw2/prob_1.py
@@ -0,0 +1,13 @@
+import numpy as np
+import matplotlib.pyplot as plt
+
+t = [0.001 * x for x in range(0, 141)]
+y = [0.873
+ - 0.873 * np.exp(-46 * t) * np.cos(105.4 * t)
+ - 0.381 * np.exp(-46 * t) * np.sin(105.4 * t) for t in t]
+
+plt.plot(t, y)
+plt.xlabel('t (sec)')
+plt.ylabel('y(t)')
+plt.title('MAE 171A - Homework 2.1\n Output y(t)')
+plt.show()
Copyright 2019--2024 Marius PETER