Created
June 19, 2020 12:21
-
-
Save netsatsawat/228f1d7e94b159ce1f2512a3f4a67b2d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| start_tm, end_tm = 0, 2 | |
| signal1 = 12 # frequency of the wave | |
| smpl_freq = 32 * signal1 # sampling frequency with oversampling factor=32 | |
| smpl_intv = 1 / smpl_freq # intervals time points are sampled | |
| tm = np.arange(start_tm, end_tm, smpl_intv) | |
| ampl1 = np.sin(2 * np.pi * signal1 * tm) # generate sine wave |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment