In [1]:
%matplotlib inline
In [2]:
import numpy as np
import matplotlib.pyplot as plt
In [47]:
n = 1
f = 2.0
omega = 2 * np.pi / f
t = np.linspace(0, 1, 100, endpoint = True)
plt.plot(t, np.sin(1 * omega * t), t, -np.sin(1 * omega * t), '--r', linewidth=1.5)
plt.xticks([])
plt.yticks([])
plt.ylim(-1.5, 1.5)
plt.title('Frequência Fundamental')
#plt.savefig('pulsacao_1d_corda_fu.png', dpi = 100, bbox_inches='tight')
Out[47]:
In [36]:
plt.plot(t, np.sin(2 * omega * t), t, -np.sin(2 * omega * t), '--r')
plt.xticks([])
plt.yticks([])
plt.ylim(-1.5, 1.5)
plt.title('Primeiro Harmônico')
Out[36]:
In [37]:
plt.plot(t, np.sin(3 * omega * t), t, -np.sin(3 * omega * t), '--r')
plt.xticks([])
plt.yticks([])
plt.ylim(-1.5, 1.5)
plt.title('Segundo Harmônico')
Out[37]:
In [38]:
plt.plot(t, np.sin(0.5 * omega * t), t, -np.sin(0.5 * omega * t), '--r')
plt.xticks([])
plt.yticks([])
plt.ylim(-1.5, 1.5)
plt.title('Frequência Fundamental')
Out[38]:
In [40]:
plt.plot(t, np.sin(1.5 * omega * t), t, -np.sin(1.5 * omega * t), '--r')
plt.xticks([])
plt.yticks([])
plt.ylim(-1.5, 1.5)
plt.title('Primeiro Harmônico')
Out[40]:
In [41]:
plt.plot(t, np.sin(2.5 * omega * t), t, -np.sin(2.5 * omega * t), '--r')
plt.xticks([])
plt.yticks([])
plt.ylim(-1.5, 1.5)
plt.title('Segundo Harmônico')
Out[41]:
In [60]:
plt.plot(np.cos(1 * omega * t), np.sin(1 * omega * t), 'k-', -np.cos(1 * omega * t), -np.sin(1 * omega * t),'k-')
#plt.plot(0.5*np.cos(1 * omega * t), 0.5*np.sin(1 * omega * t), -0.5*np.cos(1 * omega * t), -0.5*np.sin(1 * omega * t))
plt.xlim(-1.1, 1.1)
plt.ylim(-1.2, 1.2)
#plt.xticks([])
#plt.yticks([])
Out[60]:
In [ ]: