calculate the frequency where psd is maximun

4 次查看(过去 30 天)
hi i am new in matlab and i want to calculate
"the percent power content around the dominant frequency" that dominant frequency is
_"the frequency where the power spectral density (PSD) is maximum"_this process will work on ECG signal.
thank you very much

采纳的回答

Wayne King
Wayne King 2011-9-28
Hi, one thing you can do is to obtain a periodogram and then calculate the average power in an interval around the maximum frequency and then compare that to the average power from 0 to the Nyquist.
Fs = 1e3;
t = 0:1/Fs:1-(1/Fs);
x = cos(2*pi*100*t)+randn(size(t));
psdest = psd(spectrum.periodogram,x,'Fs',1e3,'NFFT',length(x));
[mx,I] = max(psdest.Data);
relperc = ...
100*avgpower(psdest,[psdest.Frequencies(I-2) psdest.Frequencies(I+2)])/avgpower(psdest,[0 Fs/2])
Wayne

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Spectral Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by