# Category : Miscellaneous Language Source Code

Archive : FORTRN77.ZIP

Filename : STCORR.FOR

C

C THIS SUBROUTINE COMPUTES A CORRELATION COEFFICIENT FOR N

C PAIRS OF VALUES.

C

DIMENSION X(1), Y(1)

SUMX = 0.0

SUMY = 0.0

SUMXY = 0.0

SUMX2 = 0.0

SUMY2 = 0.0

DO 10 I = 1,N

SUMX = SUMX + X(I)

SUMY = SUMY + Y(I)

SUMXY = SUMXY + X(I)*Y(I)

SUMX2 = SUMX2 + X(I)*X(I)

10 SUMY2 = SUMY2 + Y(I)*Y(I)

EN = N

R = (EN*SUMXY-SUMX*SUMY)/SQRT((EN*SUMX2-SUMX*SUMX)*(EN*SUMY2-

&SUMY*SUMY))

RETURN

END

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

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

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/