Remap FFT frequency bin distribution - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-22T03:47:19Z http://mathoverflow.net/feeds/question/57715 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/57715/remap-fft-frequency-bin-distribution Remap FFT frequency bin distribution Davido 2011-03-07T18:46:40Z 2011-03-25T01:22:14Z <p>I've coded up the FFT for a dataset I'm working with. My intent is to create a waterfall plot of the result, but the problem I'm running into is if I change my input data size, then I get a different number of frequency bins. Currently I'm just making my input dataset twice the size of the number of pixels I need to map to. I'm trying to figure out a way to map the frequency bins of any data set size to a specific number of pixels. For example, mapping an array of 500 values to an array that is 1250 elements long. It would be nice to have the option to perform linear and non-linear interpolation on the data mapping. I also might need to go the other way, say to map the values to an array that is 300 elements long. I'm not a math major and am coming up with a blank on this one.</p> http://mathoverflow.net/questions/57715/remap-fft-frequency-bin-distribution/58118#58118 Answer by rcompton for Remap FFT frequency bin distribution rcompton 2011-03-11T00:31:21Z 2011-03-11T00:31:21Z <p>Pick a large number of points to discretize the frequency domain with. When you have a time signal with less points zero pad until you hit that number. This is sometimes called "spectral interpolation" <a href="https://ccrma.stanford.edu/~jos/st/Zero_Padding_Theorem_Spectral.html" rel="nofollow">https://ccrma.stanford.edu/~jos/st/Zero_Padding_Theorem_Spectral.html</a> and does a nice job of interpreting the frequency domain.</p>