* G05MJF Example Program Text * Mark 20 Release. NAG Copyright 2001. * .. Parameters .. INTEGER NOUT, N, NR PARAMETER (NOUT=6,N=20,NR=6007) * .. Local Scalars .. DOUBLE PRECISION P INTEGER I, IFAIL, IGEN, M * .. Local Arrays .. DOUBLE PRECISION R(NR) INTEGER ISEED(4), X(N) * .. External Subroutines .. EXTERNAL G05KBF, G05MJF * .. Executable Statements .. WRITE (NOUT,*) 'G05MJF Example Program Results' WRITE (NOUT,*) * Set the distribution parameters P and M P = 0.8D0 M = 6000 * 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 G05MJF(2,M,P,N,X,IGEN,ISEED,R,NR,IFAIL) * WRITE (NOUT,99999) (X(I),I=1,N) STOP * 99999 FORMAT (1X,I12) END