Program f04atfe
! F04ATF Example Program Text
! Mark 27.0 Release. NAG Copyright 2019.
! .. Use Statements ..
Use nag_library, Only: f04atf, nag_wp
! .. Implicit None Statement ..
Implicit None
! .. Parameters ..
Integer, Parameter :: nin = 5, nout = 6
! .. Local Scalars ..
Integer :: i, ifail, lda, ldaa, n
! .. Local Arrays ..
Real (Kind=nag_wp), Allocatable :: a(:,:), aa(:,:), b(:), c(:), &
wks1(:), wks2(:)
! .. Executable Statements ..
Write (nout,*) 'F04ATF Example Program Results'
Write (nout,*)
! Skip heading in data file
Read (nin,*)
Read (nin,*) n
lda = n
ldaa = n
Allocate (a(lda,n),aa(ldaa,n),b(n),c(n),wks1(n),wks2(n))
Read (nin,*)(a(i,1:n),i=1,n), b(1:n)
! ifail: behaviour on error exit
! =0 for hard exit, =1 for quiet-soft, =-1 for noisy-soft
ifail = 0
Call f04atf(a,lda,b,n,c,aa,ldaa,wks1,wks2,ifail)
Write (nout,*) ' Solution'
Write (nout,99999) c(1:n)
99999 Format (1X,F9.4)
End Program f04atfe