I'm starting to learn signal processing, and am trying to understand Nyquist rate a bit better.
From what I understand, if I sample at a rate > Nyquist rate I'm supposed to have no data loss.
I'm testing on $\displaystyle f(t)=\sin(2t\pi)$.
To my understanding, its frequency is $1\ \rm{Hz}$, so the Nyquist rate is supposed to be $2\ \rm{Hz}$.
I tried FFT-ing the same function with sampling rates of $3\ \rm{Hz}$ and $10\ \rm{kHz}$ and got different results: (function + FFT displayed on same plot)
Why are the results different? Doesn't the fact that I'm over the Nyquist rate means that the FFTs are supposed to be the same?
This is the code I used in Octave:
x= [0:1/3:4]
x2 = [0:0.0001:4]
f = sin(2*x*pi)
g = sin(2*x2*pi)
subplot(2,1,1)
plot(x,f,x,fft(f))
subplot(2,1,2)
plot(x2,g,x2,fft(g))