likephysics said:
To find the frequency, Why do you need to consider the signal over long period of time?
For example - if you look at a sine wave from 0-360 with two cycles, isn't it enough to get the frequency?
I get the second part - you need a short time window to see sudden changes in frequency.
In practical terms, you only need consider the signal for a timescale much longer than the period. Conversely, in order to construct a signal (from sines and cosines) that has a significant change within a duration Dt, one needs sines and cosines with periods much less than Dt.
If your signal f(t) is 0 everywhere except for a 2-period duration of frequency 'v', the Fourier transform can be found like this:
f(t) = Rect(2v)*Sin(v)
F(q) = FourierTransform(f(t)) =Sinc(q*k)#D(q-k)+ Sinc(q*k)#D(q+k) where
Rect(x) = 'rectangle function' = 0 everywhere except for an interval centered on x, where it is 1.
Sinc(x) = Sin(x)/x
D(x) = Delta function at x
k is a scaling factor times v, k =2*pi/v, IIRC
# is a convolution operation
So, as the rectangle function gets narrower and narrower (shorter number of cycles), the Sinc function gets wider and wider; meaning there are more and more frequencies present in the original signal.