Documentation for nuft1 (SPASS).

Non uniform Fourier Transform with linear interpolation


The function nuft1 computes the Fourier transform of a non uniform signal for some given frequencies using linear interpolation to compute a continuous equivalent of the sampled signal. The optional argument lsig allows to choose between a no-signal (signal is supposed to be zero before the sampling of the first sample) and a no-activity (the previous signal is supposed to the same as the first sample) assumption.


ft = nuft1(nu,f)
ft = nuft1(nu,f,'no-signal')
ft = nuft1(nu,f,'no-activity')


nu Input signal. Non Uniform signal.
f Frequencies. Vector.
lsig Choice of left data. String among 'no-signal' and 'no-activity'. Optional, default='no-signal'.


ft Fourier Transform signal. Non Uniform signal.

See Also


% Creation of a non uniform signal

f = 1;           % signal frequency
t = 10/f;        % signal duration
fs = 1000;       % sampling frequency
ts = 1/fs;       % sampling time
t0 = 1.;         % initial time
times = t0+(0:ts:t); % time samples
a = 0.45;        % signal amplitude

ampl = a*sin(2*pi*f*times)+a*sin(4*2*pi*f*times)+0.9;   % amplitudes

u = uinit(ampl,ts,t0);

% Level crossing

levels = [.1 .4 .7 1.1 1.4 1.7];
nu = levelcross(u,levels);

% Frequencies and transform

f = 0:.02:6;
ft = nuft1(nu,f);

% Plot result