rms correction factor for fft
2 次查看(过去 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 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!