Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Include all the constants we will need
- from math import e, pi
- # Define our input
- a = [1,1,1,1]
- for k in range(len(a)):
- tmp = 0
- for n in range(len(a)):
- # in python ** is the power operator
- tmp += a[n] * (e ** ((complex(0,1) * 2 * pi * n * k) / len(a)))
- A.append(tmp) # push_back
- print A
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement