-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathM.py
More file actions
executable file
·36 lines (32 loc) · 803 Bytes
/
M.py
File metadata and controls
executable file
·36 lines (32 loc) · 803 Bytes
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
31
32
33
34
35
import matplotlib.pyplot as plt
def manf(n):
signal = []
x = []
high = 2.5
low = -2.5
count = 0
for i in n:
if i == 0:
x.append(count)
signal.append(high)
count = count+0.5
x.append(count)
signal.append(high)
x.append(count)
signal.append(low)
count = count+0.5
x.append(count)
signal.append(low)
else:
x.append(count)
signal.append(low)
count = count+0.5
x.append(count)
signal.append(low)
x.append(count)
signal.append(high)
count = count+0.5
x.append(count)
signal.append(high)
plt.plot(x,signal)
plt.show()