0

I have been given the task of calculating the frequencies to which the fourier coefficients correspond.

So my input is a discrete signal [1,4,0,1], which gives me [3, 0.5+1.5i, -2, 0.5-1.5i].

What is an intuitive way to calculate the frequencies from this result (Or can I see them already based on the coefficients)?

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
greedsin
  • 101
  • 2
    You'll need to know the sampling rate $sr$ (in samples/sec). The first frequency is always DC (0-frequency). Then the frequency of the $n$th bin is sr/n (in Hz). – bill s Sep 23 '18 at 16:20
  • 1
    Have a look here to see basic information on the use of Fourier. – Hugh Sep 23 '18 at 16:28
  • Ah ok, so i could assume I measured my samples at 0s, 0.25s, 0.5s, 0.75s and 1s. This would mean that my sampling rate is equal to 4 / 0.25 ? Which gives me 16. Then Frequence 0 would be 0 , frequence 1 would be 16? frequence 2 would be 8 and frequence 3 would 16 / 3 ? – greedsin Sep 23 '18 at 16:29
  • @bills How are you counting? Mathematica usually starts at 1 so the frequencies are (n-1)sr/N. Where n goes from 1 to N. Also, the second half of the spectrum is the negative frequencies. So in the 4 term example we only have the DC value and one frequency, followed by the mid frequency term and the conjugate of the first frequency. – Hugh Sep 23 '18 at 16:35
  • 1
    Not quite... that's a sr of 4 samples per second. But then you have posiive and negative frequencies -- really, read Hugh's answer and you will see the general case. – bill s Sep 23 '18 at 16:36
  • @greedsin Can we have some more information? Does the interval repeat so that it is {1,4,0,1,4,0,1,4,0...}. Usually for Fourier one has many more samples. What exactly are you after? – Hugh Sep 23 '18 at 17:11
  • It was for a homework, I was just provided a discrete signal with n=4 like in the question. And an sampling step of (1/30)s. – greedsin Sep 23 '18 at 17:13

0 Answers0