blob: 38d65fe120e63da16059a61f3b0781702206b876 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/usr/bin/env python3
# 2020-09-23:s5/sig/mm6/opg/2
import matplotlib.pyplot as plt
import sys
import numpy as np
lookahead = 100
values = 50
res = np.empty(values)
for n in range(values):
s = 0
for k in range(lookahead):
h = np.exp(-k/8)
x = 1
if (n - k) < 0:
x = 0
s += x * h
res[n] = s
x = np.arange(values)
plt.plot(x, res)
plt.show()
|