Documentation for `gdft` (SPASS).

## Generalized discrete Fourier Transform

### Description

The function `gdft` computes the generalized discrete Fourier transform of a non uniform signal for some given frequencies.

### Usage

```ft = gdft(sig,f)
```

### Arguments

 `sig` Input signal. Non Uniform signal. `f` Frequencies. Vector.

### Values

 `ft` Fourier Transform signal. Non Uniform signal.

• nuft (Non uniform Fourier Transform (generic function))

### 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;
tf = gdft(nu,f);

% Plot result

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