Hello,
i am trying to plot FFT samples vs freq.. bt not getting the exact peak at expected frequency.
i have attached the samples in excel sheet,..plz can some one help me and guide me to get peaks at expected frequency.
clear N=3584; n=0:3584ts=.0002;fs=1/tsts1=0.02 f=1/(N*ts); t=[0:N-1]*ts; g=input('enter the frequency required')ref=3*sin(2*pi()*g*t)figureplot(t,ref),axis tightfref=abs(fft(ref))figureplot(abs(fref))axis tight x=xlsread('41hz.xlsx')figure plot(x),grid on axis tight Xf=abs(fft(x)); f1=[0:N-1]*fplot(f1,abs(Xf)),grid onaxis tightn_2=ceil(N/2)figureplot(f1(1:n_2),abs(Xf(1:n_2))),grid on
Best Answer