PROGRAM x04dcfe ! X04DCF Example Program Text ! Mark 23 Release. NAG Copyright 2011. ! .. Use Statements .. USE nag_library, ONLY : nag_wp, x04dcf ! .. Implicit None Statement .. IMPLICIT NONE ! .. Parameters .. INTEGER, PARAMETER :: nmax = 4, nout = 6 INTEGER, PARAMETER :: la = (nmax*(nmax+1))/2 ! .. Local Scalars .. REAL (KIND=nag_wp) :: aa INTEGER :: i, ifail ! .. Local Arrays .. COMPLEX (KIND=nag_wp) :: a(la) ! .. Intrinsic Functions .. INTRINSIC cmplx, real ! .. Executable Statements .. WRITE (nout,*) 'X04DCF Example Program Results' WRITE (nout,*) FLUSH (nout) ! Generate an array of data DO i = 1, la aa = real(i,kind=nag_wp) a(i) = cmplx(aa,-aa,kind=nag_wp) END DO ! Print order (nmax-1) lower triangular matrix ifail = 0 CALL x04dcf('Lower','Unit',nmax-1,a,'Example 1:',ifail) WRITE (nout,*) FLUSH (nout) ! Print order nmax upper triangular matrix ifail = 0 CALL x04dcf('Upper','Non-unit',nmax,a,'Example 2:',ifail) END PROGRAM x04dcfe