%% Nonuniform Sample Points
% Create a signal X sampled at unevenly spaced points t. Compute the nonuniform fast Fourier transform Y.

t = [0:300 500.5:700.5];
S = 2*sin(0.1*pi*t) + sin(0.02*pi*t);
X = S + rand(size(t));
Y = nufft(X,t);

% Plot the absolute value of the transform as a function of the default frequencies.

n = length(t);
f = (0:n-1)/n;
plot(f,abs(Y))

% Copyright 2019 The MathWorks, Inc.