<< spectral_adf | FOSSEE_Signal_Processing_Toolbox | spencer >>

FOSSEE_Signal_Processing_Toolbox >> FOSSEE_Signal_Processing_Toolbox > spectral_xdf

# spectral_xdf

Compute the spectral density estimator using a data vector.

### Syntax

    sde = spectral_xdf(x)
    sde = spectral_xdf(x, win)
    sde = spectral_xdf(x, win, b)

### Parameters

x:

  Data vector.

win:

  (optional) The window name. Default is "triangle". Supported values are "triangle" and "rectangle".

b:

  (optional) Bandwidth. Default is 1 / sqrt(length(x)).

sde:

  Spectral density estimator.

### Description

The `spectral_xdf` function computes the spectral density estimator given a data vector `x`, a window name `win`, and a bandwidth `b`. The window name is used to search for a function called `win_sw` (e.g., "triangle" or "rectangle"). If `win` is omitted, the triangle window is used. If `b` is omitted, 1 / sqrt(length(x)) is used.

### Examples

    // Compute the spectral density estimator with default parameters:
    x = [1, 2, 3, 4, 5]
    sde = spectral_xdf(x)

### See also

- fft1 — Calculates the discrete Fourier transform of a matrix using Fast Fourier Transform algorithm.
- ifft1 — Compute the inverse discrete Fourier transform.

Report an issue
<< spectral_adf | FOSSEE_Signal_Processing_Toolbox | spencer >>