Documentation for nuft0 (SPASS).

Non uniform Fourier Transform with zeroth order interpolation


Description

The function nuft0 computes the Fourier transform of a non uniform signal for some given frequencies using zeroth order interpolation to compute a continuous equivalent of the sampled signal.

Usage

ft = nuft0(nu,f)

Arguments

nu Input signal. Non Uniform signal.
f Frequencies. Vector.

Values

ft Fourier Transform signal. Non Uniform signal.

See Also

Example

% 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 = nuft0(nu,f);

% Plot result

figure(1)
plot(f,abs(ft.ampl),'k','LineWidth',1)