cokelaer / spectrum

Spectral Analysis in Python
http://pyspectrum.readthedocs.io
BSD 3-Clause "New" or "Revised" License
339 stars 90 forks source link

pmusic example to fix #36

Closed cokelaer closed 7 years ago

cokelaer commented 7 years ago

Check this example. Frequencies should be 0.2 and 0.257 in the plot

x = cos(0.257*pi*n) + sin(0.2*pi*n) + 0.01*randn(size(n));
p = pmusic(x, 8,4); p(); p.plot()
p = pmusic(x, 8,4); p(); p.plot()
cokelaer commented 7 years ago

nope, this is correct because the data is real. So, the range is 0 to 0.5 hence one has to multiply by 2 to get back the 0.2 and 0.257 values.