Kwik Plot
10 PRINT "%K%W%I%K%P%L%O%T"
20 DIM A$(17,25)
30 LET MX=0
40 LET MY=0
50 LET CROSS=0
60 LET MSQX=0
70 LET MSQY=0
80 DIM X(100)
90 DIM Y(100)
100 PRINT AT 10,0;"INPUT YOUR SAMPLE SIZE."
110 INPUT N
120 CLS
130 PRINT AT 10,0;"INPUT YOUR DATA WITH EACH X(VRT)FOLLOWED BY ITS Y(HRZ)."
140 FOR I=1 TO N
150 INPUT X(I)
160 INPUT Y(I)
170 CLS
180 NEXT I
190 FOR I=1 TO N
200 LET MX=MX+X(I)
210 LET MY=MY+Y(I)
220 LET CROSS=CROSS+X(I)*Y(I)
230 LET MSQX=MSQX+(ABS X(I))**2
240 LET MSQY=MSQY+(ABS Y(I))**2
250 NEXT I
260 LET MX=MX/N
270 LET MY=MY/N
280 LET SX=SQR ((MSQX/N)-(MX)**2)
290 LET SY=SQR ((MSQY/N)-(MY)**2)
300 IF SX=0 OR SY=0 THEN GOTO 330
310 LET R=((CROSS/N)-(MX*MY))/(SX*SY)
320 PRINT "MX=";MX;" MY=";MY;" R=";R
330 IF SX=0 OR SY=0 THEN PRINT "R IS NOT COMPUTABLE"
340 PRINT
350 LET XH=X(1)
360 LET YH=Y(1)
370 FOR I=1 TO N
380 IF X(I)>XH THEN LET XH=X(I)
390 IF Y(I)>YH THEN LET YH=Y(I)
400 NEXT I
410 LET XRANGE=XH
420 LET YRANGE=YH
430 LET IX=XRANGE/16
440 LET P=YRANGE/4
450 LET Z=XH
460 FOR I=1 TO N
470 LET X(I)=INT (((X(I)/XRANGE)*16)+1.5)
480 LET Y(I)=INT (((Y(I)/YRANGE)*24)+1.5)
490 NEXT I
500 FOR I=1 TO 17
510 FOR J=1 TO 24
520 LET A$(I,J)=" "
530 NEXT J
540 NEXT I
550 FOR I=1 TO N
560 IF A$(X(I),Y(I))="8" THEN LET A$(X(I),Y(I))="9"
570 IF A$(X(I),Y(I))="7" THEN LET A$(X(I),Y(I))="8"
580 IF A$(X(I),Y(I))="6" THEN LET A$(X(I),Y(I))="7"
590 IF A$(X(I),Y(I))="5" THEN LET A$(X(I),Y(I))="6"
600 IF A$(X(I),Y(I))="4" THEN LET A$(X(I),Y(I))="5"
610 IF A$(X(I),Y(I))="3" THEN LET A$(X(I),Y(I))="4"
620 IF A$(X(I),Y(I))="2" THEN LET A$(X(I),Y(I))="3"
630 IF A$(X(I),Y(I))="*" THEN LET A$(X(I),Y(I))="2"
640 IF A$(X(I),Y(I))=" " THEN LET A$(X(I),Y(I))="*"
650 NEXT I
660 FOR L=17 TO 1 STEP -1
670 IF I=1 THEN PRINT "0";TAB 4;" \: ";A$(I)
680 IF I>1 THEN PRINT INT (Z+.5);TAB 4;" \: ";A$(I)
690 LET Z=Z-IX
700 NEXT I
710 PRINT TAB 4;"\''\':\''\''\''\''\':\''\''\''\''\''\''\':\''\''\''\''\''\':\''\''\''\''\''\':"
720 PRINT TAB 5,0;TAB 10,INT ((YRANGE-3*P)+.5);TAB 16;INT ((YRANGE-2*P)+.5);TAB 22;INT ((YRANGE-P)+.5);TAB 28;INT (YRANGE)
900 STOP
950 CLEAR
960 SAVE "1006%9"
970 RUN
People
No people associated with this content.