mirror of
https://github.com/supleed2/ELEC60011-DSD-CW.git
synced 2024-12-22 13:45:48 +00:00
Initial Commit
Include Coursework PDF and basic test script for checking answer in Python
This commit is contained in:
commit
dc28e5c175
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
**
|
||||||
|
!*.v
|
||||||
|
!*.qsys
|
||||||
|
!DSD_coursework_DE1-SoC.pdf
|
||||||
|
!README.md
|
||||||
|
!Python/
|
||||||
|
!*.py
|
BIN
DSD_coursework_DE1-SoC.pdf
Normal file
BIN
DSD_coursework_DE1-SoC.pdf
Normal file
Binary file not shown.
12
Python/test_script.py
Normal file
12
Python/test_script.py
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
from cmath import cos
|
||||||
|
from typing import Concatenate
|
||||||
|
import numpy as np
|
||||||
|
|
||||||
|
start = 0
|
||||||
|
stop = 255
|
||||||
|
step = 5
|
||||||
|
x = list(np.arange(start, stop, step)) + [stop]
|
||||||
|
acc = 0
|
||||||
|
for i in x:
|
||||||
|
acc += 0.5 * i + i * i * cos((i - 128) / 128)
|
||||||
|
print(acc.real)
|
Loading…
Reference in a new issue