fourrier analysis pwelch command
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Youssef Khmou
am 3 Mär. 2013
Bearbeitet: Youssef Khmou
am 3 Mär. 2013
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 Kommentar
Youssef Khmou
am 3 Mär. 2013
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
Siehe auch
Kategorien
Mehr zu Parametric Spectral Estimation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!