17 lines
296 B
Python
17 lines
296 B
Python
|
#!/usr/bin/env python3
|
||
|
|
||
|
import math
|
||
|
|
||
|
output = []
|
||
|
for x in range(-70, 71):
|
||
|
f = x/10
|
||
|
T = 2
|
||
|
if f == 0:
|
||
|
sinc = 1
|
||
|
else:
|
||
|
sinc = ((math.sin(math.pi * f * T)) / (math.pi * f * T)) ** 2
|
||
|
s = (T**2) * (sinc**2)
|
||
|
output.append(str((f, s)))
|
||
|
|
||
|
print(" --\n".join(output))
|