Info

この質問は閉じられています。 編集または回答するには再度開いてください。

how to calculate and plot time evolving PSD

1 回表示 (過去 30 日間)
Biljana basarin
Biljana basarin 2013 年 3 月 18 日
I need to calculate time-evolving power spectral density using Matlab periodogram function based on Welch theory to estimate the PSD of a moving boxcar filter with an overlap of 85%. In all the figures, values have to be plotted at the center of each window over which they are calculated. I got the answer: "If you want to use Welch's method in a time-evolving manner, use buffer() to segment the signal with overlap and obtain Welch estimates on those overlapped segments. I would caution you against using a boxcar filter, here I'll give you an example with a Hamming window. You can substitute your boxcar filter as needed. Further, you have not been clear about whether the overlap of 85% applies to both the time-evolving PSD or the overlap in the Welch's estimate, I'll use 50% for the latter. Fs = 1000; t = 0:0.001:4-0.001; x = cos(2*pi*10*t)+randn(size(t)); winsize = 200; numoverlap = round(0.85*winsize); win = hamming(200); %boxcar filter insted X = buffer(x,200,numoverlap); for nn = 1:size(X,2) [Pxx(:,nn),F] = pwelch(X(:,nn),win,length(win)/2,length(win),Fs); end"
I tried to apply what was suggested, I am still not sure if I got the results I need as I don’t know how to plot the results. The values have to be plotted at the center of each window over which they are calculated. Could you please explain how to do this? Thank you very much.
  1 件のコメント
Wayne King
Wayne King 2013 年 3 月 18 日
Duplicate at:
It's not good form to start a new thread when all the information above is in your existing thread.

回答 (0 件)

この質問は閉じられています。

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by