the code I used is as follows. Around 100kHz. Phase changes from 160 degrees (@99.79kHz) to -18 degrees (@101.2kHz). How can I adjust settings to correctly add 100kHz frequency point instead of 99.79kHz and 101.2kHz?
FFT_V_in = 2*fft(DAQSig(2,:))/n; FFT_V_in_mag = (abs(FFT_V_in)); FFT_V_in_phase = angle(FFT_V_in); fs=15000000 f = (0:n-1)*fs/n; subplot(2,1,1) plot(f,1000*FFT_V_in_mag) ylabel('V_{in} (mV)') ytickformat('%.2f') title('Magnitude') subplot(2,1,2) plot(f,FFT_V_in_phase*180/pi) ytickformat('%.2f') ylabel('V_{in} (degree)') title('Phase')
The output is as follows
Best Answer