fourrier analysis pwelch command
4 ビュー (過去 30 日間)
古いコメントを表示
I am creating a signal and storing it as vector data [E] using a sample frequency of Fs=1/0.0005.
I would like to use pwelch to analyse the signal in the frequency domain and also plot a graph with the absolute values instead of in dB and frequencies of 0-200 Hz on the other axis. I have been stumbling around with this for some time, could you tell me the exact command i need?
0 件のコメント
回答 (1 件)
Youssef Khmou
2013 年 3 月 3 日
編集済み: Youssef Khmou
2013 年 3 月 3 日
hi, Rune, you mean you want to use built-in spectrum , ok try this :
Fs=1000;
t=0:1/Fs:.3;
x=cos(2*pi*t*200)+randn(size(t));
Hs=spectrum.welch
F=psd(Hs,x,'Fs',Fs);
F
figure, plot(F.Frequencies,F.Data)
the dspdata or "object" F is :
F =
Name: 'Power Spectral Density'
Data: [129x1 double]
SpectrumType: 'Onesided'
NormalizedFrequency: false
Fs: 1000
Frequencies: [129x1 double]
The figure is not in dB in this case, but in case you want it as original then use semilogy :
figure, semilogy(F.Frequencies,F.Data)
% this is the same as : >>psd(Hs,x,'Fs',Fs)
1 件のコメント
Youssef Khmou
2013 年 3 月 3 日
if you want to use several instructions with FFT , then you can try my submission : http://www.mathworks.com/matlabcentral/fileexchange/40002-psd-power-spectral-density-and-amplitude-spectrum-with-adjusted-fft
参考
カテゴリ
Help Center および File Exchange で Parametric Spectral Estimation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!