Program x04cefe
! X04CEF Example Program Text
! Mark 25 Release. NAG Copyright 2014.
! .. 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 Procedures ..
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