1
$\begingroup$

On the x axis of periodogram, one should have either a period or frequency. What frequency is used in Periodogram --- angular or frequency in "Hz"?

No matter what data I feed it, it keeps showing the x axis from [0,0.5]. Why? Or more importantly, I do want real frequencies so that I have an idea what to filter out.

Since Periodogram accepts only 1-Dimensional lists, it cannot know anything about a frequency and assumes that the data are spaced 1 second apart. It has the option of SampleRate but it only accepts integer values. How do I get around it (what if my data are spaced 0.7 seconds apart?)?

So how do I display "real" frequencies in the data using Periodogram?

Note, to have some example, I am playing with this:

dataclean = Table[Sin[n], {n, 0, 20, 0.01}];
Periodogram[dataclean, PlotRange -> All, 
 ScalingFunctions -> "Absolute"]

The periodogram makes no sense at all. $\sin(x)$ has a period of $2\pi$. That means that the angular frequency is 1 and the normal frequency is $\sim 0.16$. Additionally, its fourier series is just $\sin(x)$. But in this case the frequency peak position depends on the length of the list and its division. Also note that using SampleRate does not affect the peak position at all. I know it is my mistake of misunderstanding the Periodogram but I am at loss at the moment.

$\endgroup$

1 Answer 1

-2
$\begingroup$

In order to get things visible you have to adapt the plot range. Try eg

dataclean = Table[Sin[2 \[Pi] n] + 1/3 Sin[6 \[Pi] n], {n, 0, 20, 0.01}];

ListPlot[Take[dataclean, 200]]

Periodogram[dataclean, PlotRange -> {{0, 0.4}, All}, ScalingFunctions -> "Absolute"]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.