This file contains 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
dt = 1e-6 #1MHz sampling | |
f_signal = 5e3 #5khz | |
SAMPLES_PER_PERIOD = 200 | |
NPERIODS = 150 | |
#Compute sinewave with relative accuracy: | |
t = range(0, dt, SAMPLES_PER_PERIOD) | |
sigT = 11.*sinpi(2*f_signal*t) | |
sig = zeros(SAMPLES_PER_PERIOD*NPERIODS) | |
for i in 1:NPERIODS |