Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- # <nbformat>3.0</nbformat>
- # <codecell>
- %matplotlib inline
- # <codecell>
- import pylab as pl
- import numpy as np
- # <codecell>
- a = np.arange(1000)
- a = a/1000.0*(np.pi*2*60)
- a = np.sin(a)
- # <codecell>
- pl.plot(a)
- # <codecell>
- f = np.fft.fft(a)
- f = np.abs(f)
- #f = np.fft.fftshift(f)
- # <codecell>
- pl.plot(f)
- # <codecell>
- for i in range(len(f)):
- print str(i) + " " + str(int(f[i]))
- # <codecell>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement