반응형
1 import matplotlib.pyplot as plt
2 import numpy as np
3
4
5 Fs = 8000
6 f = 3
7 sample = 8000
8 x = np.arange(sample)
9 y = np.sin(2 * np.pi * f * x / Fs)
10 plt.plot(x, y)
11 plt.xlabel('sample(n)')
12 plt.ylabel('voltage(V)')
13 plt.show()
반응형
'[python]Basic' 카테고리의 다른 글
| [python]class (0) | 2022.08.11 |
|---|---|
| [python]PyMYSQL (0) | 2022.08.07 |
| python basic (0) | 2018.11.12 |
| python programming (0) | 2018.11.12 |
| [python][serial]serial port list (0) | 2018.11.12 |