Difference between revisions of "Applets:Periodendauer periodischer Signale"
From LNTwww
David.Jobst (talk | contribs) |
David.Jobst (talk | contribs) |
||
Line 1: | Line 1: | ||
+ | <p> | ||
+ | {{BlaueBox|TEXT= | ||
+ | <B style="font-size:18px">Funktion:</B> | ||
+ | $$x(t) = A_1\cdot cos\Big(2\pi f_1\cdot t- \frac{2\pi}{360}\cdot \phi_1\Big)+A_2\cdot cos\Big(2\pi f_2\cdot t- \frac{2\pi}{360}\cdot \phi_2\Big)$$ | ||
+ | }} | ||
+ | </p> | ||
<html> | <html> | ||
Line 25: | Line 31: | ||
</head> | </head> | ||
− | <body> | + | <body onload="drawNow()"> |
− | + | <!-- Resetbutton, Checkbox und Formel --> | |
+ | <p> | ||
+ | <input type="checkbox" id="gridbox" onclick="showgrid();" checked> <label for="gridbox">Gitterlinien Zeigen</label> | ||
+ | <button class="button" onclick="drawNow();">Reset</button> | ||
+ | </p> | ||
<div id="cnfBoxHtml" class="jxgbox" style="width:600px; height:150px; float:top; margin:-10px 20px 100px 0px;"></div> | <div id="cnfBoxHtml" class="jxgbox" style="width:600px; height:150px; float:top; margin:-10px 20px 100px 0px;"></div> | ||
<div id="pltBoxHtml" class="jxgbox" style="width:600px; height:600px; border:1px solid black; margin:-100px 20px 10px 0px;"></div> | <div id="pltBoxHtml" class="jxgbox" style="width:600px; height:600px; border:1px solid black; margin:-100px 20px 10px 0px;"></div> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<script type="text/javascript"> | <script type="text/javascript"> | ||
− | + | function drawNow() { | |
// Grundeinstellungen der beiden Applets | // Grundeinstellungen der beiden Applets | ||
JXG.Options.text.useMathJax = true; | JXG.Options.text.useMathJax = true; | ||
− | + | cnfBox = JXG.JSXGraph.initBoard('cnfBoxHtml', { | |
showCopyright: false, showNavigation: false, axis: false, | showCopyright: false, showNavigation: false, axis: false, | ||
grid: false, zoom: { enabled: false }, pan: { enabled: false }, | grid: false, zoom: { enabled: false }, pan: { enabled: false }, | ||
boundingbox: [-1, 2.2, 12.4, -2.2] | boundingbox: [-1, 2.2, 12.4, -2.2] | ||
}); | }); | ||
− | + | pltBox = JXG.JSXGraph.initBoard('pltBoxHtml', { | |
showCopyright: false, axis: false, | showCopyright: false, axis: false, | ||
zoom: { factorX: 1.1, factorY: 1.1, wheel: true, needshift: true, eps: 0.1 }, | zoom: { factorX: 1.1, factorY: 1.1, wheel: true, needshift: true, eps: 0.1 }, | ||
grid: false, boundingbox: [-0.5, 2.2, 12.4, -2.2] | grid: false, boundingbox: [-0.5, 2.2, 12.4, -2.2] | ||
}); | }); | ||
− | + | cnfBox.addChild(pltBox); | |
− | + | ||
+ | }; | ||
+ | // Definition der Funktion zum An- und Ausschalten des Koordinatengitters | ||
+ | function showgrid() { | ||
+ | if (gridbox.checked) { | ||
+ | xaxis = pltBox.create('axis', [ [0, 0], [1, 0] ], {}); | ||
+ | yaxis = pltBox.create('axis', [ [0, 0], [0, 1] ], {}); | ||
+ | } else { | ||
+ | xaxis.removeTicks(xaxis.defaultTicks); | ||
+ | yaxis.removeTicks(yaxis.defaultTicks); | ||
+ | } | ||
+ | pltBox.fullUpdate(); | ||
+ | }; | ||
</script> | </script> | ||
</body> | </body> |
Revision as of 22:01, 18 September 2017
Funktion: $$x(t) = A_1\cdot cos\Big(2\pi f_1\cdot t- \frac{2\pi}{360}\cdot \phi_1\Big)+A_2\cdot cos\Big(2\pi f_2\cdot t- \frac{2\pi}{360}\cdot \phi_2\Big)$$