Why is spectrum.periodogram not recommended, and how to substitute pwelch in it's place?
이전 댓글 표시
A message pops up in Matlab when I use spectrum.periodogram to find the median frequency of a signal, saying that it is not recommended. Why is this? I also get the same message for spectrum.pwelch
psdest = psd(spectrum.periodogram,x,'Fs',1000,'NFFT',length(x));
normcumsumpsd = cumsum(psdest.Data)./sum(psdest.Data);
Ind = find(normcumsumpsd <=0.5,1,'last');
fprintf('Median frequency is %2.3f Hz\n',psdest.Frequencies(Ind));
After lots of research I still don't understand the output of the psd well enough so that I can susbstitute spectrum.periodgram. Normally I find my PSD using:
[Pxx,Fx] = pwelch(s,[],[],[],fs);
plot(Fx,10*log10(Pxx))
Ideally I would like to find the median frequency by manipulating the Pxx and Fx values but I am struggling to relate Pxx directly to psdest.Data. I would be grateful if someone could point me in the right direction. Thank you in advance!
채택된 답변
추가 답변 (3개)
Sahaj Sandhu
2015년 6월 17일
0 개 추천
Hey, have you calculated other features also ? like mean power or total power ?
bhavya kailkhura
2015년 11월 14일
0 개 추천
Is there an implementation of pwelch for 2d data? For example, if I want to plot psd of an image with dc component centered, how can I use pwelch to do that?
Thanks!
댓글 수: 1
balandong
2017년 5월 3일
Calculate at each dimension then sum the two
Greg Dionne
2016년 10월 28일
0 개 추천
The spectrum package is no longer recommended for use.
카테고리
도움말 센터 및 File Exchange에서 Parametric Spectral Estimation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!