FFT-subdivide the frequency range
2 次查看(过去 30 天)
显示 更早的评论
I work on FFT. My frequency range varies from (0-60 Hz). For my study, after FFT, i have to subdivide the frequency range into the following frequency range :0.5-4; 4-8; 8-12; 12-30; 30-60. How to subdivide the required frequency range after performing FFT???
0 个评论
回答(2 个)
Guru
2013-7-7
Without knowing anything about the signal/data you are taking the FFT of, this is impossible. If you think your frequency range should vary completely between 0-60 Hz, then you can create a frequency vector that spans this range and say there is a 1:1 correlation between this frequency vector and the FFT, suppose your FFT variable is X:
% X = fft(...)
f = linspace(0,60,length(X));
I wish someday users would actually look at some other example questions and realize the best questions contain some MATLAB code that clearly describes what they are doing and supplement that with what they want to do, rather than rather cryptic text that describes what they want but no idea of what they are doing or dealing with (or a related example - we need not know the specifics of what you are doing but needs more context)
0 个评论
Matt J
2013-7-7
编辑:Matt J
2013-7-7
YourSpectrum=fftshift(YourSpectrum);
N=length(YourSpectrum);
dF=... %frequency sampling interval
frequencyAxis = ((0:N-1) -ceil((N-1)/2))*dF;
interval= frequencyAxis>=0.5 & frequencyAxis<=4; %One of the intervals
plot(frequencyAxis(interval), YourSpectrum(interval));
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!