←back to thread

What Is the Fourier Transform?

(www.quantamagazine.org)
474 points rbanffy | 1 comments | | HN request time: 0s | source
Show context
trgn ◴[] No.45140227[source]
Can somebody eli5, im an amateur. How does the transform know the frequencies of the output. Do you have to specify a number n, and then it decomposes it into n frequencies. Or do you give it a list of frequencies, and then it decomposes the coefficient or amplitude or something for each?

I guess what i want to know, in the examples it always shows like 3 or 4 constituents frequencies as output, but why not hundreds or a million? Is that decided upfront /paramtetizable?

The article isn't helpful, it just says something like "all possible frequencies".

replies(4): >>45140548 #>>45140637 #>>45140802 #>>45148376 #
1. woopsn ◴[] No.45140637[source]
If you take N samples of a real signal you will get N/2+1 bins of information from the DFT, covering 0Hz out to about half the sampling rate.

The bins do not actually measure a specific frequency, more like an average of the power around that frequency.

As you take more and more samples, the bin spacing gets finer and the range of frequencies going into the average becomes tighter (kind of). By collecting enough samples (at an appropriate rate), you can get as precise a measurement as you need around particular frequencies. And by employing other tricks (signal processing).

If you graph the magnitude of the DFT, signals that are a combination of power at just a few frequencies show just a few peaks, around the related bins. Eg a major chord would show 3 fundamental peaks corresponding to the 3 tones (then a bunch of harmonics)

https://en.wikipedia.org/wiki/Fourier_transform#/media/File:...

So you detect these peaks to find out what frequency components are present. (though peak detection itself is complicated)