rms correction factor for fft
4 ビュー (過去 30 日間)
古いコメントを表示
Good Afternoon All,
I am looking to apply a correction factor to the fft for a hanning window. I have looked and have seen 2*sqrt(8/3) for most literature in matlab and have stumbled across this page (<http://mathforum.org/kb/thread.jspa?threadID=2060176&messageID=7150679#7150679>)
which says the correction factor to be 2/sqrt(2);
How can I determine which correction function to use in my code?
%Importing data file
Data=xlsread('GME_DOE_LVO_2mm_90C_DOE_run_1.xls','DOE_run=1');
TimeDomain=Data(:,2);
HPC=Data(:,4);
N=length(HPC);
dF=(TimeDomain(end)-TimeDomain(1));
FS=N/dF;
FreqRange=(0:N-1)*FS/N;
FreqRange=FreqRange';
win=hann(N,'periodic');
p=HPC.*win;
P = fft(p,N);
P = 2*sqrt(2)*P/N; %2*sqrt(2) correction error
Mag=abs(P);
Phase=angle(P)*180/pi; % in degrees
1 件のコメント
Matz Johansson Bergström
2014 年 7 月 30 日
Maybe upload HPC and TimeDomain as variables instead of copy/paste in here.
回答 (1 件)
Image Analyst
2014 年 7 月 30 日
How are you defining linear averaging? You mean like convolving with a rect function? That's the same thing as multiplying your signal spectrum by a sinc function in Fourier space, since the FT or a rect is a sinc. So just do that then inverse FT and you have your signal.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Fourier Analysis and Filtering についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!