Octave Band Averages from PSD
7 ビュー (過去 30 日間)
古いコメントを表示
Hi everyone,
I am using a simple code to extract the PSD from a set of time-based sound data. I am now interested in obtaining the octave band averages of this data and I am completely lost. Can anyone help me out?
The code I ave at the moment is:
*clear all
close all
echo on
Fs= 4000; % Sampling Frequency (Hz)
x = xlsread('No Excitation.csv',1,'J35:J52034');
Hs=spectrum.welch;
psd(Hs,x,'Fs',Fs);
echo off;*
Thanks, John
0 件のコメント
回答 (1 件)
Wayne King
2012 年 10 月 6 日
編集済み: Wayne King
2012 年 10 月 6 日
You want to average the power over octave bands? You can do that with the avgpower() method.
t = 0:0.001:1-0.001
Fs = 1000;
x = cos(2*pi*50*t)+1/2*sin(2*pi*200*t)+randn(size(t));
psdest = psd(spectrum.welch,x,'Fs',Fs);
Now to get the average power from [0,100] Hz
pwr = avgpower(psdest,[0 100]);
It may be more useful to consider the percentage of the total power in that interval
totpower = avgpower(psdest,[0 Fs/2]);
100*(pwr/totpower)
参考
カテゴリ
Help Center および File Exchange で Octave についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!