diff options
author | Marius Peter <blendoit@gmail.com> | 2019-07-08 18:53:29 -0700 |
---|---|---|
committer | Marius Peter <blendoit@gmail.com> | 2019-07-08 18:53:29 -0700 |
commit | e01b5ffedbc57671e5b7f2e900276ffd14882a88 (patch) | |
tree | e5e8d404a0ca262ae44a5f3884793b4ce349b34d /hw2 | |
parent | 9060d5a3d1f4d247b376894dea64aa694d9e98a6 (diff) |
problem 1
Diffstat (limited to 'hw2')
-rw-r--r-- | hw2/prob_1.py | 13 |
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() |