FFT-subdivide the frequency range
2 views (last 30 days)
Show older comments
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 Comments
Answers (2)
Guru
on 7 Jul 2013
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 Comments
Matt J
on 7 Jul 2013
Edited: Matt J
on 7 Jul 2013
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 Comments
See Also
Categories
Find more on Fourier Analysis and Filtering in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!