본문 바로가기
프로그램

[파이썬] 합성 파형 그래프

by 오디세이99 2022. 10. 30.
728x90
반응형

 

import numpy as np
import matplotlib.pyplot as plt

# fig = plt.figure(1)
fig = plt.figure(figsize=(16,8))
# Get x values of the sine wave
t = np.arange(0, 5, 0.01);

ax1 = fig.add_subplot(311)
ax1.plot(t, np.sin(2*np.pi*t))
ax2 = fig.add_subplot(312)
ax2.plot(t, np.sin(4*np.pi*t))
ax3 = fig.add_subplot(313)
ax3.plot(t, np.sin(4*np.pi*t)+np.sin(2*np.pi*t))

plt.show()

728x90
반응형

댓글