5 * Revision 1.1.1.1 1996/04/01 15:02:56 mclareni
10 SUBROUTINE CORSET (V,C,NP)
11 C Correlated Gaussian random number package
13 C CORSET sets up the generation
14 C CORGEN actually generates a set of NP random numbers
15 C Gaussian-distributed with covariance matrix V
16 C and mean values zero.
18 C NP is dimension of vectors and matrices
19 C V(NP,NP) is covariance matrix
20 C C(NP,NP) is working space used internally to hold the
22 C X(NP) is the vector of random numbers generated by CORGEN
24 DIMENSION V(NP,NP), C(NP,NP)
26 C Compute C = square root of matrix V
31 10 CK = CK + C(J,K)*C(J,K)
32 C(J,J) = SQRT(ABS(V(J,J) - CK))
38 20 CK = CK + C(I,K)*C(J,K)
39 C(I,J) = (V(I,J) - CK) /C(J,J)