Category : Miscellaneous Language Source Code
Archive   : FORTRN77.ZIP
Filename : TAB1.FOR

 
Output of file : TAB1.FOR contained in archive : FORTRN77.ZIP
SUBROUTINE TAB1(ND,A,NI,BL,BH,VMIN,VMAX,TOTAL,VMEAN,STDEV,
&FREQ,IOP)
C
C TABULATE FOR A VARIABLE IN AN OBSERVATION VECTOR, THE
C FREQUENCY AND PERCENT FREQUENCY OVER GIVEN CLASS INTERVALS,
C IN ADDITION, CALCULATE THE TOTAL, AVERAGE, STANDARD
C DEVIATION, MINIMUM AND MAXIMUM.
C
DIMENSION A(1), FREQ(1)
VMIN = 1.0E37
VMAX = -1.0E37
DO 1 I = 1,ND
IF (A(I) - VMIN) 3,2,2
3 VMIN = A(I)
2 IF (A(I) - VMAX) 1,1,4
4 VMAX = A(I)
1 CONTINUE
TN = NI
SINT = ABS(BH - BL)/(TN - 2.0)
DO 5 I = 1,NI
FREQ(I) = 0.0
5 CONTINUE
TOTAL = 0.0
SOS = 0.0
NIMI = NI - 1
DO 7 I = 1,ND
CHE = BL
DO 6 J = 1,NIMI
IF (A(I).LT.CHE) GO TO 11
CHE = CHE + SINT
6 CONTINUE
FREQ(NI) = FREQ(NI) + 1.
GO TO 7
11 FREQ(J) = FREQ(J) + 1.
7 CONTINUE
TNOO = ND
IF (IOP.EQ.2) GO TO 12
8 DO 9 I = 1,ND
TOTAL = TOTAL + A(I)
SOS = SOS + A(I)*A(I)
9 CONTINUE
VMEAN = TOTAL/TNOO
T = TOTAL
STDEV = SQRT((SOS - T*T/TNOO)/(TNOO - 1.))
RETURN
12 DO 10 I = 1,NI
FREQ(I) = FREQ(I)*100.0/TNOO
10 CONTINUE
GO TO 8
RETURN
END


  3 Responses to “Category : Miscellaneous Language Source Code
Archive   : FORTRN77.ZIP
Filename : TAB1.FOR

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/