SignalMath.Periodogram Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0

Overload List

Periodogram<T>(Vector<T>) Computes the periodogram (power spectral density estimate) of a real signal vector and returns the result.
Periodogram<T>(Vector<T>, Vector<T>) Computes the periodogram (power spectral density estimate) of a real signal vector.
Periodogram<T>(ReadOnlySpan<T>, Int32, Span<T>, Int32) Computes the periodogram (power spectral density estimate) of a real signal.

Periodogram<T>(Vector<T>)

Computes the periodogram (power spectral density estimate) of a real signal vector and returns the result.
C#
public static Vector<T> Periodogram<T>(
	Vector<T> input
)

Parameters

input  Vector<T>
The input signal vector.

Type Parameters

T
The element type (double or float).

Return Value

Vector<T>
A vector containing the periodogram values.

Remarks

The periodogram is computed as the squared magnitude of the FFT, normalized by the signal length. For a real signal of length N, the output length is N/2 + 1.

Exceptions

ArgumentNullException Thrown when input is null.

Periodogram<T>(Vector<T>, Vector<T>)

Computes the periodogram (power spectral density estimate) of a real signal vector.
C#
public static void Periodogram<T>(
	Vector<T> input,
	Vector<T> output
)

Parameters

input  Vector<T>
The input signal vector.
output  Vector<T>
The output vector to hold the periodogram values.

Type Parameters

T
The element type (double or float).

Remarks

The periodogram is computed as the squared magnitude of the FFT, normalized by the signal length. For a real signal of length N, the output length is N/2 + 1.

Exceptions

ArgumentNullException Thrown when input or output is null.
ArgumentException Thrown when the output vector is too small for the periodogram output.

Periodogram<T>(ReadOnlySpan<T>, Int32, Span<T>, Int32)

Computes the periodogram (power spectral density estimate) of a real signal.
C#
public static void Periodogram<T>(
	ReadOnlySpan<T> signal,
	int signalStride,
	Span<T> result,
	int resultStride
)

Parameters

signal  ReadOnlySpan<T>
The input signal.
signalStride  Int32
The stride between successive elements in signal.
result  Span<T>
The output span to hold the periodogram values.
resultStride  Int32
The stride between successive elements in result.

Type Parameters

T
The element type (double or float).

Remarks

The periodogram is computed as the squared magnitude of the FFT, normalized by the signal length. For a real signal of length N, the output length is N/2 + 1.

Exceptions

ArgumentException Thrown when the result span is too small for the periodogram output.

See Also