You can use pwelch for finding the power spectral density of the signal.
For example,
pwelch(x,250*30, [],[],250);
where x is the input signal, 250*30 is the window length and 250 is the sampling frequency.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!