Median Frequency(Fmed)

3 次查看(过去 30 天)
shez96
shez96 2012-4-9
评论: krn99 2017-4-5
I need help finding the Median frequency of a power spectram. (Fmed), I am new to matlab so any helo will be really appreciated.

采纳的回答

Wayne King
Wayne King 2012-4-9
Hi Shenal, you can do the following:
t = 0:0.001:1-0.001;
x = cos(2*pi*50*t-pi/4)+0.5*sin(2*pi*100*t)+randn(size(t));
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));
  2 个评论
shez96
shez96 2012-4-10
THanks for that
krn99
krn99 2017-4-5
is that above code is applicable for 200000 sample emg signal

请先登录,再进行评论。

更多回答(1 个)

Greg Dionne
Greg Dionne 2016-10-28
Try: medfreq
Introduced in R2015a.

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by