File Exchange

## ffts(X,V,Xq,method,​window)

version 1.4.0.0 (8.84 KB) by Dirk-Jan Kroon

### Dirk-Jan Kroon (view profile)

Fast Fourier Transform ( FFT ) of scattered data

1 Download

Updated 24 Dec 2014

View License

ffts, Performs the fast Fourier transform (FFT) on scatter data.

Yq = ffts(X,V,Xq)

or

Yq = ffts(X,V,Xq, method, window)

inputs,
X : Array with positions [m x 1]
V : Array with values [m x 1]
Xq : Node locations [ n x 1], with equally spaced points (see linspace)
(optional)
method : 1. 'grid', gridding (Default)
2. 'fit' , b-spline fit
window : 1. 'bspline', bspline (default)
2. 'kaiser', kaiser Bessel function

outputs,
Fq : The Fourier spectrum of the scatter data [ n x 1].

Gridding:
1. The scattered values (V) at positions (X) are smoothed ( convolution )
by a kernel to a regular grid. With the grid a 2 times oversampled
version of Xq
2. The data is multiplied with a set of density compensation weights.
Calculate as in step 1, but instead all values are set to 1. The
density compensation is 1 divided by this result.
3. The values on the regular grid are converted to the fourier
domain using a FFT.
4. Trim field of view, to size of Xq. This compensates the oversampling
of step 2. The sidelobes due to finite window size are now
clipped off.
5. The fourier domain is multipled by an apodization correction
function. Which is the 1/Fourier Transform of the kernel of step 1
to remove the effect of the kernel.

B-spline fit:
1. B-splines sampled on a regular grid are fitted to the values (V) at
positions (X), so they least squares approximate the data.
2. At the regular grid (Xq), values are interpolated using the fitted
B-splines
3. The FFT is done on the b-spline interpolated points

### Cite As

Dirk-Jan Kroon (2019). ffts(X,V,Xq,method,window) (https://www.mathworks.com/matlabcentral/fileexchange/48857-ffts-x-v-xq-method-window), MATLAB Central File Exchange. Retrieved .

Marc

### Marc (view profile)

Awesome function.

### Updates

 24 Dec 2014 1.4.0.0 Added Kaiser-Bessel window Added up-sampling combined with Fourier trimming, to reduce aliasing effects 23 Dec 2014 1.3.0.0 update comment 23 Dec 2014 1.2.0.0 Added warning if nodes are undefined. Added alternative fitting method. 23 Dec 2014 1.1.0.0 Replace "range" from stats toolbox by "max-min"
##### MATLAB Release Compatibility
Created with R2012b
Compatible with any release
##### Platform Compatibility
Windows macOS Linux