Program g01alfe
! G01ALF Example Program Text
! Mark 30.1 Release. NAG Copyright 2024.
! .. Use Statements ..
Use nag_library, Only: g01alf, nag_wp
! .. Implicit None Statement ..
Implicit None
! .. Parameters ..
Integer, Parameter :: nin = 5, nout = 6
! .. Local Scalars ..
Integer :: ifail, n
! .. Local Arrays ..
Real (Kind=nag_wp) :: res(5)
Real (Kind=nag_wp), Allocatable :: x(:)
Integer, Allocatable :: iwrk(:)
! .. Executable Statements ..
Write (nout,*) 'G01ALF Example Program Results'
Write (nout,*)
! Skip heading in data file
Read (nin,*)
! Read in the problem size
Read (nin,*) n
Allocate (x(n),iwrk(n))
! Read in data
Read (nin,*) x(1:n)
! Calculate summary statistics
ifail = 0
Call g01alf(n,x,iwrk,res,ifail)
! Display results
Write (nout,99999) 'Maximum ', res(5)
Write (nout,99999) 'Upper Hinge (75% quantile)', res(4)
Write (nout,99999) 'Median (50% quantile)', res(3)
Write (nout,99999) 'Lower Hinge (25% quantile)', res(2)
Write (nout,99999) 'Minimum ', res(1)
99999 Format (1X,A,F16.4)
End Program g01alfe