|
|
Zeile 2: |
Zeile 2: |
| //Eingabe | | //Eingabe |
| | | |
- | ir=2;
| + | |
- | it0=1000;
| + | |
- | KT=2;
| + | |
- | ipr=1+ir*KT/100;
| + | |
- | t=100;
| + | |
- | it2=it0*POT(ipr,t);
| + | |
| | | |
| var p1xy=[0.5,0.5]; | | var p1xy=[0.5,0.5]; |
Zeile 36: |
Zeile 31: |
| | | |
| s = 1; | | s = 1; |
- | deg = brd.createElement('slider',[[0.10,-0.3],[0.4,-0.3],[1,2,4]],{name:'Polynomgrad',snapWidth:1});
| + | ir = brd.createElement('slider',[[0.10,-0.3],[0.4,-0.3],[0,2,100]],{name:'Infektionrate pro 100',snapWidth:1}); |
- |
| + | pit0 = brd.createElement('slider',[[0.10,-0.4],[0.4,-0.4],[0,2,6]],{name:'10^x Anfangsinfizierte',snapWidth:1}); |
| + | KT = brd.createElement('slider',[[0.10,-0.5],[0.4,-0.5],[0,10,100]],{name:'Kontakte pro Tag',snapWidth:1}); |
| + | T = brd.createElement('slider',[[0.10,-0.3],[0.4,-0.3],[0,10,100]],{name:'Tage',snapWidth:1}); |
| + | it0=POT(1,pit0); |
| + | ipr=1+ir*KT/100; |
| + | it2=it0*POT(ipr,t); |
| + | |
| curve = brd.createElement('curve',[datax,data],{strokeColor:'gray',dash:2}); | | curve = brd.createElement('curve',[datax,data],{strokeColor:'gray',dash:2}); |
| curve.updateDataArray = function() { | | curve.updateDataArray = function() { |
Zeile 50: |
Zeile 51: |
| des1 = brd.createElement('text',[-0.4,0.4,function(){ return "x = -1 bis 1";}],{strokeColor:'black',fontSize:'14px'}); | | des1 = brd.createElement('text',[-0.4,0.4,function(){ return "x = -1 bis 1";}],{strokeColor:'black',fontSize:'14px'}); |
| des2 = brd.createElement('text',[-0.4,0.3,function(){ return "y = -1 bis 1";}],{strokeColor:'black',fontSize:'14px'}); | | des2 = brd.createElement('text',[-0.4,0.3,function(){ return "y = -1 bis 1";}],{strokeColor:'black',fontSize:'14px'}); |
- | </jsxgraph>
| |
- | <jsxgraph box="jxg2box" width="700" height="200">
| |
- | brd2 = JXG.JSXGraph.initBoard('jxg2box', {boundingbox:[-1.1, 2.1, 2.1, -1.1], grid: false, axis:false, showCopyright:false, showNavigation:false});
| |
- | brd.addChild(brd2);
| |
- | H1 = brd2.createElement('text',[-0.8,1.8,"Vorgegebene Punkte"],{strokeColor:'black',fontSize:'14px'});
| |
- |
| |
- | xA = brd2.createElement('text',[-0.8,1.4,function(){ return "Ax = " + Math.round(10000*p1.X())/10000;}],{strokeColor:'black',fontSize:'14px'});
| |
- | xB = brd2.createElement('text',[-0.8,1.2,function(){ return "Bx = " + Math.round(10000*p2.X())/10000;}],{strokeColor:'black',fontSize:'14px'});
| |
- | xC = brd2.createElement('text',[-0.8,1.0,function(){ return "Cx = " + Math.round(10000*p3.X())/10000;}],{strokeColor:'black',fontSize:'14px'});
| |
- | xD = brd2.createElement('text',[-0.8,0.8,function(){ return "Dx = " + Math.round(10000*p4.X())/10000;}],{strokeColor:'black',fontSize:'14px'});
| |
- | xE = brd2.createElement('text',[-0.8,0.6,function(){ return "Ex = " + Math.round(10000*p5.X())/10000;}],{strokeColor:'black',fontSize:'14px'});
| |
- | yA = brd2.createElement('text',[-0.1,1.4,function(){ return "Ay = " + Math.round(10000*p1.Y())/10000;}],{strokeColor:'black',fontSize:'14px'});
| |
- | yB = brd2.createElement('text',[-0.1,1.2,function(){ return "By = " + Math.round(10000*p2.Y())/10000;}],{strokeColor:'black',fontSize:'14px'});
| |
- | yC = brd2.createElement('text',[-0.1,1.0,function(){ return "Cy = " + Math.round(10000*p3.Y())/10000;}],{strokeColor:'black',fontSize:'14px'});
| |
- | yD = brd2.createElement('text',[-0.1,0.8,function(){ return "Dy = " + Math.round(10000*p4.Y())/10000;}],{strokeColor:'black',fontSize:'14px'});
| |
- | yE = brd2.createElement('text',[-0.1,0.6,function(){ return "Ey = " + Math.round(10000*p5.Y())/10000;}],{strokeColor:'black',fontSize:'14px'});
| |
- |
| |
- | H2 = brd2.createElement('text',[-0.8,-0.4,"Näherungsgleichung"],{strokeColor:'black',fontSize:'14px'});
| |
- | t = brd2.createElement('text',[-0.8,-0.8,function(){ return "Polynom f(x) = " + regressionPolynomial.getTerm();}],{strokeColor:'black',fontSize:'14px'});
| |
| </jsxgraph> | | </jsxgraph> |