efrei/theorie-signal/exercices/plot_sx2.py

10 lines
164 B
Python
Raw Normal View History

2022-01-04 13:29:34 +01:00
#!/usr/bin/env python3
import math
for n in range(-8, 9):
r = 1/2
if n != 0:
f = (math.fabs(math.sin(n*math.pi*r)/n*math.pi))**2
print(f)