# Defining frequency axis for periodogram

I am trying to simulate example 8.2.2 from Hayes, Statistical Digital Signal Processing and Modelling, on MATLAB.

Let $x(n)$ be a WSS process consisting of random phase sinusoid in unit variance. $$x(n) = A\sin(n\omega_{0} + \phi) + v(n)$$

$A = 5$, $\omega_{0} = 0.4\pi$, $N = 256$

Can anyone help me figure out how to generate the frequency vector such that the peak appears at $0.4\pi$? I am able to achieve the spectrum that is shown in the example, but my x-axis can only be called frequency bin as of now.

• What is the sampling frequency that you have used? – A_A Sep 22 '18 at 10:24
• I am not sure about that. All I can tell you is that $n$ is defined for 1:N in steps of 1. – MaxFrost Sep 22 '18 at 10:27

As you have taken 1024 point FFT, multiply the x-axis with a factor of 2*pi/1024.

For now your peak is at sample number 200. 200*2*pi/1024 approximately equal to 0.4*pi