Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from math import *
- def sinwave(N, fc, freq): # genera funzione seno
- result = []
- for x in range(N):
- result.append(32000*cos(2*pi*freq*x/fc-pi/2))
- return result
- def squarewave(N,fc,freq,dc): # genera funzione quadra
- result = []
- for x in range(N):
- if x<N/2 :
- result.append(32000)
- if x>=N/2:
- result.append(0)
- return result
Advertisement
Add Comment
Please, Sign In to add comment