1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77:
| procedure TForm1.TabSheet4Enter(Sender: TObject); var code: Integer; s: String; var i: Integer; tmp1, tmp2, Summe1, Summe2, Summe3, Summe4: Extended; begin if Streu = 2 then begin case ASW of 1: begin gridladen(StringGrid2,'c:\statAuswertung\Stringgrids\uw95.grd',true); Val(StringGrid2.Cells[n-1,QW], KS, code); end; 2: begin if (QW-2 > 0) then begin gridladen(StringGrid3,'c:\statAuswertung\Stringgrids\uw90.grd',true); Val(StringGrid3.Cells[n-1,QW-2], KS, code); end else begin ShowMessage('nur 10%, 5% und 1% möglich!'); end; end; 3: begin if (QW-2 > 0) then begin gridladen(StringGrid4,'c:\statAuswertung\Stringgrids\uw75.grd',true); Val(StringGrid4.Cells[n-1,QW-2], KS, code); end else begin ShowMessage('nur 10%, 5% und 1% möglich!'); end; end; end; end else if Streu = 1 then begin case ASW of 1: begin if (QW-2 > 0) then begin gridladen(StringGrid5,'c:\statAuswertung\Stringgrids\bw95.grd',true); Val(StringGrid5.Cells[n-1,QW-2], KS, code); end else begin ShowMessage('nur 10%, 5% und 1% möglich!'); end; end; 2: begin if (QW-2 > 0) then begin gridladen(StringGrid6,'c:\statAuswertung\Stringgrids\bw90.grd',true); Val(StringGrid6.Cells[n-1,QW-2], KS, code); end else begin ShowMessage('nur 10%, 5% und 1% möglich!'); end; end; 3: begin if (QW-2 > 0) then begin gridladen(StringGrid7,'c:\statAuswertung\Stringgrids\bw75.grd',true); Val(StringGrid7.Cells[n-1,QW-2], KS, code); end else begin ShowMessage('nur 10%, 5% und 1% möglich!'); end; end; end; Str(KS:3:2, s); end else ShowMessage('Bitte Streuung wählen');
Summe1 := 0; for i := 1 to n do begin Val(StringGrid1.Cells[4,i], tmp1, code); if code = 0 then Summe1 := Summe1 + tmp1; end; Summe1 := Summe1 / n; Str(Summe1:3:0, Mittelwert); StringGrid8.Cells[1,1] := Mittelwert;
Summe2 := 0; for i := 1 to n do begin Val(StringGrid1.Cells[4,i], tmp2, code); if code = 0 then Summe2 := Summe2 + sqr(tmp2 - Summe1); end; Summe2 := sqrt(Summe2/4); Str(Summe2:3:2, SAW);
Summe3 := Summe2 / Summe1; Str(Summe3:3:2, VK);
Summe4 := Summe1 - (KS * Summe2); Str(Summe4:3:0, W); end; |