1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import numpy as np import matplotlib.pyplot as plt from scipy.integrate import odeint import math def y(t): y=np.exp(-4*t) * (1 - np.cos(t) + (np.cos(1.0)-1)/np.sin(1.0)*np.sin(t)) return y plt.rcParams["figure.figsize"] = [5.50, 5.50] plt.rcParams["figure.autolayout"] = True t = np.linspace(0, 1, 100) plt.plot(t, y(t)) plt.grid() plt.xlabel('t') plt.ylabel('y(t)') plt.savefig("ex446.png", dpi=100) plt.show() |
Full Article pdf
Recent Comments