nufft

Fourier transform of data sampled at nonuniform points.

Category: Mathematics > Fourier Analysis and Filtering

Syntax

Y = nufft(X)

Same as fft(X), with unit-spaced sample points.

Y = nufft(X, t)

Samples are located at the points t; frequencies are the default (0:n-1)/n.

Y = nufft(X, t, f)

Evaluates the transform at the frequencies f.

Y = nufft(X, t, f, dim)

Operates along dimension dim.

Description

The result at frequency f(k) is the sum over j of X(j)*exp(-2*pi*1i*t(j)*f(k)). When the points t are evenly spaced and f is the default grid, this reduces to the ordinary DFT. The point of nufft is that t and f need not be uniform.

To analyze unevenly timed measurements, pass the measurement times as t and the frequencies of interest as f.

Input arguments

X
Sample values, vector or array.
t
Sample points, one per element of X along the operating dimension. Use [] for 0:n-1.
f
Frequencies at which to evaluate, in cycles per unit of t.
dim
Dimension to operate along.

Output arguments

Y
Transform values, one per frequency in f.

Examples

Uniform points reproduce fft

v = [1 2 3 4];
t = [0 0.25 0.5 0.75];
Y = nufft(v, t, 0:3);
max(abs(Y - fft(v))) < 1e-12
Output
ans = logical
   1

Irregular sample times

x = [0.1 0.4 0.7];
nufft([1 1 1], x, [0 1 2 3])
Output
ans = 1×4 complex

    3.0000 + 0.0000i   -0.3090 - 0.2245i   -0.1910 - 0.5878i    0.8090 - 2.4899i

Notes

MatLivre evaluates the sum directly, so cost grows with the product of the number of samples and of frequencies, and the result is exact rather than approximated.

See also

fft nufftn ifft fftshift