10 REM THIS IS A GW-BASIC PROGRAM BY KINDLYRAT THAT 20 REM TEST THE "ROOT-SUM-SQUARE" METHOD OF DETERMINING 30 REM THE TOTAL UNCERTAINTY OF A MEASUREMENT SYSTEM. 40 REM A SYSTEM OF TWO METERS, ONE 3% AND ONE 2% METER 50 REM ARE USED AS TEST METERS. 1000 MEASUREMENTS OF 60 REM RANDOM UNCERTAINTIES ARE MADE AND THE NUMBER OF 70 REM MEASUREMENTS THAT FALL OUTSIDE THEORETICAL LIMITS 80 REM ARE DISPLAYED WITH THE LIMITS AND INDIVIDUAL READINGS. 100 RANDOMIZE TIMER 110 FOR N = 1 TO 1000 120 REM *** CALCULATE METER1 READING 3% *** 130 LET A! = 1 + (INT (RND * 6)) 140 READ1! = 97.00 + A 150 REM *** CALCULATE METER2 READING 2% *** 160 LET A! = 1 + (INT (RND * 4)) 170 READ2! = 98.00 + A 180 REM *** CALCULATE SUM OF ERRORS *** 190 SUM! = READ1 + READ2 200 REM *** CALCULATE ROOTSUMSQUARE *** 210 REM UNCERTAINTY BY ROOTSUMSQUARE IS 3.60555% 220 REM WILL THE UNCERTAINTY SUM BE GREATER THAT RSS CALCULATION? 230 IF SUM! > 207.21110 THEN PRINT "MORE" 240 IF SUM! < 192.78889 THEN PRINT "LESS" 250 IF SUM! > 207.21110 THEN EXCEEDED = EXCEEDED + 1 260 IF SUM! < 192.78889 THEN EXCEEDED = EXCEEDED + 1 270 PRINT "LOW", "HIGH", "THIS READING" 280 PRINT "192.79999", "207.21110", SUM! 290 PRINT "EXCEEDED LIMITS", EXCEEDED 300 PRINT 310 NEXT N 320 END