Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-02 - 43,50145/hist.sss
There are 2 other files named hist.sss in the archive. Click here to see a list.
C                                                                       HIST  10
C     ..................................................................HIST  20
C                                                                       HIST  30
C        SUBROUTINE HIST                                                HIST  40
C                                                                       HIST  50
C        PURPOSE                                                        HIST  60
C           PRINT A HISTOGRAM OF FREQUENCIES VERSUS INTERVALS           HIST  70
C                                                                       HIST  80
C        USAGE                                                          HIST  90
C           CALL HIST(NU,FREQ,IN)                                       HIST 100
C                                                                       HIST 110
C        DESCRIPTION OF PARAMETERS                                      HIST 120
C           NU   - HISTOGRAM NUMBER (3 DIGITS MAXIMUM)                  HIST 130
C           FREQ - VECTOR OF FREQUENCIES                                HIST 140
C           IN   - NUMBER OF INTERVALS AND LENGTH OF FREQ (MAX IS 20)   HIST 150
C                  NORMALLY, FREQ(1) CONTAINS THE FREQUENCY SMALLER THANHIST 160
C                  THE LOWER BOUND AND FREQ(IN) CONTAINS THE FREQUENCY  HIST 170
C                  LARGER THAN THE UPPER BOUND                          HIST 180
C                                                                       HIST 190
C        REMARKS                                                        HIST 200
C           FREQUENCIES MUST BE POSITIVE NUMBERS                        HIST 210
C                                                                       HIST 220
C        SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED                  HIST 230
C           NONE                                                        HIST 240
C                                                                       HIST 250
C        METHOD                                                         HIST 260
C           THE LARGEST FREQUENCY IS DETERMINED AND SCALING IS USED     HIST 270
C           IF REQUIRED                                                 HIST 280
C                                                                       HIST 290
C     ..................................................................HIST 300
C                                                                       HIST 310
      SUBROUTINE HIST(NU,FREQ,IN)                                       HIST 320
      DIMENSION JOUT(20),FREQ(20)                                       HIST 330
C                                                                       HIST 340
    1 FORMAT(6H EACH ,A1,8H EQUALS ,I2,7H POINTS,/)                     HIST 350
    2 FORMAT(I6,4X,20(4X,A1))                                           HIST 360
    3 FORMAT(9H0INTERVAL,4X,19(I2,3X),I2)                               HIST 370
    4 FORMAT(1H1,47X,11H HISTOGRAM ,I3)                                 HIST 380
    5 FORMAT(10H0FREQUENCY,20I5)                                        HIST 390
    6 FORMAT(6H CLASS)                                                  HIST 400
    7 FORMAT(113H   ----------------------------------------------------HIST 410
     1----------------------------------------------------------)       HIST 420
    8 FORMAT(1H )                                                       HIST 430
    9 FORMAT(A1)                                                        HIST 440
   10 FORMAT(1H*)                                                       HIST 450
C                                                                       HIST 460
      REWIND 13                                                         HIST 470
      WRITE(13,10)                                                      HIST 480
      REWIND 13                                                         HIST 490
      READ(13,9) K                                                      HIST 500
      REWIND 13                                                         HIST 510
      WRITE(13,8)                                                       HIST 520
      REWIND 13                                                         HIST 530
      READ(13,9) NOTH                                                   HIST 540
      REWIND 13                                                         HIST 550
C                                                                       HIST 560
C        PRINT TITLE AND FREQUENCY VECTOR                               HIST 570
C                                                                       HIST 580
      WRITE(6,4) NU                                                     HIST 590
      DO 12 I=1,IN                                                      HIST 600
   12 JOUT(I)=FREQ(I)                                                   HIST 610
      WRITE(6,5)(JOUT(I),I=1,IN)                                        HIST 620
      WRITE(6,7)                                                        HIST 630
C                                                                       HIST 640
C        FIND LARGEST FREQUENCY                                         HIST 650
C                                                                       HIST 660
      FMAX=0.0                                                          HIST 670
      DO 20 I=1,IN                                                      HIST 680
      IF(FREQ(I)-FMAX) 20,20,15                                         HIST 690
   15 FMAX=FREQ(I)                                                      HIST 700
   20 CONTINUE                                                          HIST 710
C                                                                       HIST 720
C        SCALE IF NECESSARY                                             HIST 730
C                                                                       HIST 740
      JSCAL=1                                                           HIST 750
      IF(FMAX-50.0) 40,40,30                                            HIST 760
   30 JSCAL=(FMAX+49.0)/50.0                                            HIST 770
      WRITE(6,1)K,JSCAL                                                 HIST 780
C                                                                       HIST 790
C        CLEAR OUTPUT AREA TO BLANKS                                    HIST 800
C                                                                       HIST 810
   40 DO 50 I=1,IN                                                      HIST 820
   50 JOUT(I)=NOTH                                                      HIST 830
C                                                                       HIST 840
C        LOCATE FREQUENCIES IN EACH INTERVAL                            HIST 850
C                                                                       HIST 860
      MAX=FMAX/FLOAT(JSCAL)                                             HIST 870
      DO 80 I=1,MAX                                                     HIST 880
      X=MAX-(I-1)                                                       HIST 890
      DO 70 J=1,IN                                                      HIST 900
      IF(FREQ(J)/FLOAT(JSCAL)-X) 70,60,60                               HIST 910
   60 JOUT(J)=K                                                         HIST 920
   70 CONTINUE                                                          HIST 930
      IX=X*FLOAT(JSCAL)                                                 HIST 940
C                                                                       HIST 950
C        PRINT LINE OF FREQUENCIES                                      HIST 960
C                                                                       HIST 970
   80 WRITE(6,2)IX,(JOUT(J),J=1,IN)                                     HIST 980
C                                                                       HIST 990
C        GENERATE CONSTANTS                                             HIST1000
C                                                                       HIST1010
      DO 90 I=1,IN                                                      HIST1020
   90 JOUT(I)=I                                                         HIST1030
C                                                                       HIST1040
C        PRINT INTERVAL NUMBERS                                         HIST1050
C                                                                       HIST1060
      WRITE(6,7)                                                        HIST1070
      WRITE(6,3)(JOUT(J),J=1,IN)                                        HIST1080
      WRITE(6,6)                                                        HIST1090
      RETURN                                                            HIST1100
      END                                                               HIST1110