SignalMath.GenerateGaussianNoise Method

Definition

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

Overload List

GenerateGaussianNoise(Double, Random, Span<Double>)Generates Gaussian white noise.
GenerateGaussianNoise(Int32, Double, Random) Generates Gaussian white noise and returns it as a vector.
GenerateGaussianNoise(Double, Double, Random, Span<Double>) Generates Gaussian white noise with DC offset.
GenerateGaussianNoise(Int32, Double, Double, Random) Generates Gaussian white noise with DC offset and returns it as a vector.

GenerateGaussianNoise(Double, Random, Span<Double>)

Generates Gaussian white noise.
C#
public static void GenerateGaussianNoise(
	double standardDeviation,
	Random rng,
	Span<double> destination
)

Parameters

standardDeviation  Double
The standard deviation of the noise.
rng  Random
The random number generator to use.
destination  Span<Double>
The destination span to write the generated signal.

GenerateGaussianNoise(Int32, Double, Random)

Generates Gaussian white noise and returns it as a vector.
C#
public static Vector<double> GenerateGaussianNoise(
	int count,
	double standardDeviation,
	Random rng
)

Parameters

count  Int32
The number of samples to generate.
standardDeviation  Double
The standard deviation of the noise.
rng  Random
The random number generator to use.

Return Value

Vector<Double>
A vector containing the generated signal.

GenerateGaussianNoise(Double, Double, Random, Span<Double>)

Generates Gaussian white noise with DC offset.
C#
public static void GenerateGaussianNoise(
	double standardDeviation,
	double offset,
	Random rng,
	Span<double> destination
)

Parameters

standardDeviation  Double
The standard deviation of the noise.
offset  Double
The DC offset to add to the signal.
rng  Random
The random number generator to use.
destination  Span<Double>
The destination span to write the generated signal.

GenerateGaussianNoise(Int32, Double, Double, Random)

Generates Gaussian white noise with DC offset and returns it as a vector.
C#
public static Vector<double> GenerateGaussianNoise(
	int count,
	double standardDeviation,
	double offset,
	Random rng
)

Parameters

count  Int32
The number of samples to generate.
standardDeviation  Double
The standard deviation of the noise.
offset  Double
The DC offset to add to the signal.
rng  Random
The random number generator to use.

Return Value

Vector<Double>
A vector containing the generated signal.

See Also