Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
how to calculate and plot time evolving PSD
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Wayne King
el 18 de Mzo. de 2013
Duplicate at:
It's not good form to start a new thread when all the information above is in your existing thread.
Respuestas (0)
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!