# Appendix B: Examples

## B.5 Interpolation Methods

                PROGRAM EXA_5
          C     USE DISLIN         for Fortran 90!

                DIMENSION X(16), Y(16)
                CHARACTER*8 CPOL(4),CTIT*60

                DATA X/0.,1.,3.,4.5,6.,8.,9.,11.,12.,12.5,13.,15.,16.,
               *       17.,19.,20./
               * Y/2.,4.,4.5,3.,1.,7.,2.,3.,5.,2.,2.5,2.,4.,6.,5.5,4./
               * CPOL/'SPLINE','BARS','STEP','LINEAR'/ NYA/2700/

                CTIT='Interpolation Methods'

                CALL SETPAG('DA4P')
                CALL DISINI
                CALL PAGERA
                CALL COMPLX
                CALL INCMRK(1)
                CALL HSYMBL(25)
                CALL TITLIN(CTIT,1)
                CALL AXSLEN(1500,500)
                CALL SETGRF('LINE','LINE','LINE','LINE')

                DO I=1,4
                  CALL AXSPOS(350,NYA-(I-1)*500)
                  CALL POLCRV(CPOL(I))
                  CALL MARKER(0)

                  CALL GRAF(0.,20.,0.,5.,0.,10.,0.,5.)
                  NX=NXPOSN(1.)
                  NY=NYPOSN(8.)
                  CALL MESSAG(CPOL(I),NX,NY)
                  CALL CURVE(X,Y,16)

                  IF(I.EQ.4) THEN
                    CALL HEIGHT(50)
                    CALL TITLE
                  END IF
                  CALL ENDGRF
                END DO

                CALL DISFIN
                END

Figure B.5: Interpolation Methods

Next | Previous | Contents