<< peig | FOSSEE_Signal_Processing_Toolbox | phaseInputParseAs_ab >>

FOSSEE_Signal_Processing_Toolbox >> FOSSEE_Signal_Processing_Toolbox > periodogram

# periodogram

Compute the periodogram power spectral density estimate.

### Syntax

    [Pxx, f] = periodogram(x)
    [Pxx, f] = periodogram(x, win)
    [Pxx, f] = periodogram(x, win, nfft)
    [Pxx, f] = periodogram(x, win, nfft, fs)
    [Pxx, f] = periodogram(x, win, nfft, fs, range)

### Parameters

x:

  Real or complex-valued input signal (vector).

win:

  (optional) Window applied to the signal. If empty or unspecified, a rectangular window is used.

nfft:

  (optional) Number of frequency bins. Default is 256 or the next power of 2 greater than the length of `x`.

fs:

  (optional) Sampling rate. Default is 1.

range:

  (optional) Spectrum range. Options are "onesided" (default for real signals), "twosided", or "centered".

### Description

The `periodogram` function computes the power spectral density (PSD) of a signal using the periodogram method. It supports various configurations for windowing, FFT length, sampling rate, and spectrum range.

### Examples

    // Compute periodogram for a sine wave:
    t = 0:0.01:1
    x = sin(2 * %pi * 10 * t)
    periodogram(x)

### See also

- hamming — Generate the filter coefficients of a Hamming window.
- fft1 — Calculates the discrete Fourier transform of a matrix using Fast Fourier Transform algorithm.

### Bibliography

[1] Stoica, P., & Moses, R. L. (2005). Spectral Analysis of Signals. Pearson Prentice Hall.

Report an issue
<< peig | FOSSEE_Signal_Processing_Toolbox | phaseInputParseAs_ab >>