summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Peter <blendoit@gmail.com>2019-07-08 18:53:29 -0700
committerMarius Peter <blendoit@gmail.com>2019-07-08 18:53:29 -0700
commite01b5ffedbc57671e5b7f2e900276ffd14882a88 (patch)
treee5e8d404a0ca262ae44a5f3884793b4ce349b34d
parent9060d5a3d1f4d247b376894dea64aa694d9e98a6 (diff)
problem 1
-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