From e01b5ffedbc57671e5b7f2e900276ffd14882a88 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Mon, 8 Jul 2019 18:53:29 -0700 Subject: problem 1 --- hw2/prob_1.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 hw2/prob_1.py 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() -- cgit v1.2.3