I'm trying to understand Fast Fourier Transform in Detail to find out what exactly the frequencies when dealing with discrete sequence,
Here is what I've done,
First I've taken a Sinusoidal wave with 1Hz
Frequency
A = 4; %Amplitude
Fs = 8; %Sampling Frequency 8Hertz
Ts = 1/Fs; %Sampling Rate = 0.125
f = 1; %Frequency of Wave = 1Hz
t = 1/f; %Time period = 1 Second
n = 0:Ts:(t); %{0,0.125,0.250,0.375,0.500,0.625,0.750,0.875,0.100}
x=A*sin(2*pi*f*n);
Now, If I plot it,
subplot(2,1 ,1);
plot(n,x);
The values of the sampled points are ,
Generated Sample's Amplitudes = {0,3,4,3,0,-3,-4,-3,0}
% Sinewave Period = (Samples/Period)*(Time/Sample)
% Sinewave Period = (8)*(0.125)
% Sinewave Period = 1sec
% Reciprocal of 1sec => 1Hz <-- Original Frequency
Now let's take its FFT by manually giving discrete sequence as input,
FFT divides your Sampling frequency into N equal parts and returns the strength of the signal at each of these frequency levels. What it means is you are dividing frequencies from 0 to 8(Fs) into 8(No.of Samples) equal parts.
F = fft([0 3 4 3 0 -3 -4 -3 0]);
and this is true.
But what if I take the FFT of completely Random Sequence, like,
fft([40 2 8 31 6 8 -4]);
Have a look at its Frequency Plot,
I've reading a book and found,
Sinewave Period = (Samples/Period)*(Time/Sample) Freqeuncy = 1/Sinewave Period
In Random sequence I mentioned above have total of 7 samples, but What it its period ? What it is the time between each Sample in this signal since it is totally random ? How could this sequence represents more than 1 frequency ?