MATLAB: Problem with FFT plot

data inportfft

I have measurements of time and current which were made with a digital oscilloscope. When I import them in MATLAB and plot them my sinewave is pretty much like my the waveform I saw in the oscilloscope and in the excel file (time domain).
The problem is that, when i try to apply fft to my data, i'm taking this waveform as a result.
I think, that i should see my only harmonic in 50Hz, since there is a 50Hz sinewave taken as an input. Instead I'm taking a nearly zero harmonic. I think that I probably haven't understood something quite well here and I'm getting really confused about my problem.Can anyone help me?
Here is my code:
t=xlsread('C:\Users\Riko\Documents\MATLAB\Meas_V5_L2','A2:A10001');
I=xlsread('C:\Users\Riko\Documents\MATLAB\Meas_V5_L2','C2:C10001');
figure(1)
plot(t,I,'r');
xlabel('time (s)')
ylabel('current(A)')
grid on
N = 2^nextpow2(length(I));
Y = fft(I,N);
Fs = 5000; %Sampling frequency z
f = Fs/2*linspace(0,1,N);
p = abs(Y)/N; %Power of signal figure(2)
plot(f,p)
Thanks, in advance!

Best Answer

I would change the plot to:
semilogy(f,p)
axis([0 50 ylim])
Looking closely at the plot, it seems to be relatively ‘clean’ and without significant noise, so the other peaks may be too low amplitude to see easily. Taking the log will probably allow you to see them. You may want to expand the x axis limits in the axis call beyond 50 Hz once you see the semilogy plot.