PROGRAM x04cefe ! X04CEF Example Program Text ! Mark 23 Release. NAG Copyright 2011. ! .. Use Statements .. USE nag_library, ONLY : nag_wp, x04cef ! .. Implicit None Statement .. IMPLICIT NONE ! .. Parameters .. INTEGER, PARAMETER :: nmax = 5, nout = 6 INTEGER, PARAMETER :: lda = nmax ! .. Local Scalars .. INTEGER :: i, ifail, j ! .. Local Arrays .. REAL (KIND=nag_wp) :: a(lda,nmax) ! .. Intrinsic Functions .. INTRINSIC real ! .. Executable Statements .. WRITE (nout,*) 'X04CEF Example Program Results' WRITE (nout,*) FLUSH (nout) ! Generate an array of data DO j = 1, nmax DO i = 1, lda a(i,j) = real(10*i+j,kind=nag_wp) END DO END DO ! Print nmax by nmax band matrix with 1 sub-diagonal and 1 super-diagonal ifail = 0 CALL x04cef(nmax,nmax,1,1,a,lda,'Band Matrix:',ifail) END PROGRAM x04cefe