0
$\begingroup$

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. enter image description here

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

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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