ELEC60011-DSD-CW/Python/test_script.py
Aadi Desai 8ed2b5bc0e
Task 1 & 2
Add source files and update to completed state at end of Task 2
2022-01-30 17:18:39 +00:00

14 lines
267 B
Python

from cmath import cos
from typing import Concatenate
import numpy as np
start = 0
stop = 255
step = 1 / 1024
x = list(np.arange(start, stop, step)) + [stop]
acc = 0
for i in x:
# acc += 0.5 * i + i * i * cos((i - 128) / 128)
acc += i + i * i
print(acc.real)