functions_evaluations.py
13 lines
| 313 B
| text/x-python
|
PythonLexer
/ test_fft / functions_evaluations.py
|
r4 | import numpy as np | ||
import matplotlib.pyplot as plt | ||||
def sineWave( bufferSize, nbPeriod): | ||||
deltaX = nbPeriod * 2 * np.pi / bufferSize | ||||
xVector = np.arange( bufferSize ) * deltaX | ||||
yVector = np.sin( xVector ) | ||||
return yVector | ||||
if __name__ == '__main__': | ||||
waveform = sineWave( 256, 3 ) | ||||
plt.plot(waveform) | ||||
plt.show() | ||||