The following program specifies a multivariate normal population with covariance matrix and mean given by
.
Then it displays the Cholesky square root of the covariance matrix.
Module MainModule
Sub Main()
Dim arand As New AMOSRANDOMLib6.AmosRanGen
Dim ad As New AmosDebug.AmosDebug
Dim Covariances(2) As Double
Dim Means(1) As Double
Covariances(0) = 3
Covariances(1) = 1
Covariances(2) = 2
Means(0) = 4
Means(1) = 5
Call arand.SpecifyPopulation(Covariances, Means)
Dim SquareRoot(2) As Double
Call arand.Sqrt(SquareRoot(0), 2)
Call ad.PrintTriangle(SquareRoot)
End Sub
End Module