Pythonで双曲線関数
\begin{align}
y&= \sinh x\\
y&= \cosh x\\
y&= \tanh x\\
\end{align}
を描く。結果

以下ソースコード
import numpy as np
import matplotlib.pyplot as plt
theta = np.arange(-4, 4, 0.01)
plt.plot(theta, np.sinh(theta))
plt.plot(theta, np.cosh(theta))
plt.plot(theta, np.tanh(theta))
plt.grid()
plt.xlim([-4, 4])
plt.ylim([-6, 6])
plt.show()
コメント