Number of samples for doing FFT
3 views (last 30 days)
Show older comments
-2 down vote favorite
I have a set of 10006 samples which resembles 10 period s of a 50 hz signal which is sampled with 50 KHZ.
as you know the freqeuncy of bins are calculated via SF/N where SF is sampling frequency and N is the number of samples.
I want to have the magnitudes of the frequency in integer multiples of 5 HZ up to 9 KHZ (for example: 5 , 10 , ..., 1025, 1030...,8000, 80005..9000).
so if I do the fft with 10006 samples my frequency bins are not any more the integer multiples of 5 and instead they are integer multiples of 50000/10006. and if I truncate my samples then i will have integer multiples of 5 Hz bins but my samples are not any more resembling exactly 10 periods which means I have leakge effec !
so I am wondering how to have exactlu 5 HZ bins and with out having the spectrum distorted by leakage effect ?!!
0 Comments
Answers (1)
Matt J
on 29 Aug 2014
If you zero-pad to 20K samples then you will have SF/N=2.5Hz. You can then discard every other frequency sample if you want frequency sampling of 5 Hz.
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!