How to measure power spectral density in matlab?

1k Views Asked by At

I am trying to measure the PSD of a stochastic process in matlab, but I am not sure how to do it. If this is not the right place to ask, please point me in the right direction.

The stochastic process describes wind speed, and is represented by a vector of real numbers. Each entry corresponds to the wind speed in a point in space, measured in m/s. The points are 0.0005 m apart. How do I measure and plot the PSD? Let's call the vector V. My first idea was to use

[p, w] = pwelch(V);
loglog(w,p);

But is this correct? The thing is, that I'm given an analytical expression, which the PSD should (in theory) match. By plotting it with these two lines of code, it looks all wrong. Specifically it looks as though it could need a translation and a scaling. Other than that, the shapes of the two are similar.

enter image description here