<< CL_cov2cor Math CL_cross >>

CelestLab >> Math > CL_covDraw

CL_covDraw

Random values from covariance

Calling Sequence

values = CL_covDraw(means,covm,num)

Description

Parameters

means :

Vector of expectations (Nx1)

covm:

Covariance matrix (NxN)

num :

(integer) Number of random samples to draw

values :

Matrix containing the random samples. Each sample is a column vector. The number of columns is num. (NxP)

Authors

See also

Examples

means =  [10; 20];
covm = [ 4, 1; 1, 5];
values = CL_covDraw(means, covm, 1000);  // drawn values

// estimate mean values and covariance from samples
[means2, covm2] = CL_stat(values);

Report an issue
<< CL_cov2cor Math CL_cross >>