ILNumerics Ultimate VS

Statisticsmvnrnd Method (InArraySingle, InArraySingle, Int32, Boolean)

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
Chooses samples from a multivariate random distribution.

[ILNumerics Statistics Toolbox]

Namespace:  ILNumerics.Toolboxes
Assembly:  ILNumerics.Toolboxes.Statistics (in ILNumerics.Toolboxes.Statistics.dll) Version: 5.5.0.0 (5.5.7503.3146)
Syntax

public static RetArray<float> mvnrnd(
	InArray<float> inMu = null,
	InArray<float> inSigma = null,
	int n = -1,
	bool sigmaIsSquaredCov = true
)

Parameters

inMu (Optional)
Type: ILNumericsInArraySingle
[optional] centers, size d x n; if d x 1 is given, optional parameter n is used to replicate mu accordingly, if null, the values will be genereated with a center of zero.
inSigma (Optional)
Type: ILNumericsInArraySingle
[optional] covariance matrix, must be positive definite, size d x d or vector of lenght d, if null (not set), unitiy matrix is expected.
n (Optional)
Type: SystemInt32
[optional] number of samples to generate, per default (-1) the number of columns of inMu defines that number.
sigmaIsSquaredCov (Optional)
Type: SystemBoolean
[optional] if false: safe the effort of finding the square root of inSigma parameter; default: true.

Return Value

Type: RetArraySingle
random numbers as taken from the multivariate random probability distribution given by mu and sigma.
Remarks

In order to safe the step of finding the root of sigma, the following options exist:

  • Provide only the diagonal of a (virtual) diagonal matrix to inSigma.
  • Compute the root manually, give it to sigma and set sigmaIsSquaredCov to false.

In case sigmaIsSquaredCov set to 'false' and inSigma is given, the root is computed via Cholesky factorization. The result of the last root finding process is cached and reused for subsequent requests with the same set of n and inSigma parameters.

[ILNumerics Statistics Toolbox]

See Also

Reference