* G05MZF Example Program Text * Mark 20 Release. NAG Copyright 2001. * .. Parameters .. INTEGER NP, NOUT, N, NR PARAMETER (NP=11,NOUT=6,N=20,NR=60) * .. Local Scalars .. INTEGER I, IFAIL, IGEN, IP1, ITYPE * .. Local Arrays .. DOUBLE PRECISION P(NP), R(NR) INTEGER ISEED(4), X(N) * .. External Subroutines .. EXTERNAL G05KBF, G05MZF * .. Data statements .. DATA P/0.01D0, 0.02D0, 0.04D0, 0.08D0, 0.2D0, 0.3D0, + 0.2D0, 0.08D0, 0.04D0, 0.02D0, 0.01D0/ * .. Executable Statements .. WRITE (NOUT,*) 'G05MZF Example Program Results' WRITE (NOUT,*) * Set the distribution parameters P and M IP1 = -5 ITYPE = 1 * Initialise the seed to a repeatable sequence ISEED(1) = 1762543 ISEED(2) = 9324783 ISEED(3) = 42344 ISEED(4) = 742355 * IGEN identifies the stream. IGEN = 1 CALL G05KBF(IGEN,ISEED) * Choose MODE = 2 IFAIL = 0 CALL G05MZF(2,P,NP,IP1,ITYPE,N,X,IGEN,ISEED,R,NR,IFAIL) * WRITE (NOUT,99999) (X(I),I=1,N) * STOP * 99999 FORMAT (1X,I12) END