MATLAB: Spectrum analysis of wind

wind spectrum

Hello every one.
I am having Wind hourly data. Now I want to know spectral analysis of wind for cycles/day..
could any one help me out.. It would be better appreciation.
Thanks in advance.. phanindra

Best Answer

If you have the Signal Processing Toolbox, you can use periodogram() to get a power spectral density estimate of the wind data in cycles/day. periodogram() is nice because it will output an appropriate frequency vector for you and confidence intervals if you desire.
I'll show you how to do that with your sampling frequency, 1 sample/hour. I'll have to simulate some data because you did not attach yours.
30 days of data:
t = 0:1:(30*24)-1;
x = 1.5*cos(2*pi*(1/24)*t)+randn(size(t)); % 1 cycle per days plus noise
[Pxx,F] = periodogram(x,rectwin(length(x)),length(x),1);
plot(F*24,10*log10(Pxx))
xlabel('Cycles/Day'); ylabel('dB');
Otherwise, you can use fft() in base MATLAB, to the same in base MATLAB, see