The following program is not showin the frequency properly that is supposed to be got by fft. please help.
clear all;clc;close all;
fs=1e3;
t=(0:fs)'/fs*10;
f=30;
x=sin(2*pi*f*t);
xf=fft(x);
plot(t,x);
hold on
plot(t,xf,'r');
grid on; axis tight; zoom on;