I am trying to perform the fast fourrier transform to non uniformly sampled data . The output is in the following image
It was obtained using the following code in MATLAB
%% x is the sampled signal %% t is the sampling instances L=size(x,1); t_new = linspace(t(1),t(end),L); % Performing interpolation to obtain a uniformly sampled signal x_new_cubic = interp1(t,x,t_new,'cubic'); x_new_pchip =interp1(t,x,t_new,'pchip'); x_new_spline = interp1(t,x,t_new,'spline'); NFFT = 2^nextpow2(L); X = fft(x_new_cubic,NFFT)/L; F=1000*linspace(0,1,NFFT/2+1); figure; subplot(121); plot(F,20*log10(abs(X(1:NFFT/2+1)))); xlabel('Frequency[Hz]'); ylabel('|X|[dB]'); w = hamming(L,'periodic'); x_win = w.*x_new_cubic(1:L)'; X_win = fft(x_win,NFFT)/L; subplot(122); plot(F,20*log10(abs(X_win(1:NFFT/2+1)))); xlabel('Frequency[Hz]'); ylabel('|X|[dB]'); title('Hamming Window')
It seems that I can't trust such result, but I am not sure too. Can any one give me some advice?