Difference between revisions of "Applets:Periodendauer periodischer Signale"
From LNTwww
David.Jobst (talk | contribs) |
David.Jobst (talk | contribs) |
||
Line 1: | Line 1: | ||
− | |||
− | |||
<p> | <p> | ||
{{BlaueBox|TEXT= | {{BlaueBox|TEXT= | ||
− | $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)$ | + | <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> | </p> | ||
Line 9: | Line 8: | ||
<html> | <html> | ||
<head> | <head> | ||
− | + | <meta charset="utf-8" /> | |
− | + | <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jsxgraph/0.99.6/jsxgraphcore.js"></script> | |
− | + | <!-- <script type="text/javascript" src="https://en.lntwww.de/MathJax/unpacked/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full,local/mwMathJaxConfig"></script> --> | |
− | + | <!-- <script type="text/javascript" src="https://cdn.rawgit.com/mathjax/MathJax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full"></script> --> | |
+ | |||
+ | <style> | ||
.button { | .button { | ||
background-color: black; | background-color: black; | ||
Line 29: | Line 30: | ||
} | } | ||
− | + | </style> | |
− | |||
− | |||
− | |||
− | |||
</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="plotBoxHtml" class="jxgbox" style="width:600px; height:600px; border:1px solid black; margin:170px 20px 0px 0px;"></div> | |
− | + | <div id="cnfBoxHtml" class="jxgbox" style="width:600px; height:150px; margin:-760px 20px 0px 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; | ||
Line 146: | Line 129: | ||
document.getElementById("T_0").innerHTML = Math.round(getT0() * 100) / 100; | document.getElementById("T_0").innerHTML = Math.round(getT0() * 100) / 100; | ||
}, 50); | }, 50); | ||
+ | |||
+ | }; | ||
+ | //Bestimmung des Wertes T_0 mit der Funktion von Siebenwirth | ||
Line 209: | Line 195: | ||
− | + | //Definition der Funktion zum An- und Ausschalten des Koordinatengitters | |
− | + | function showgrid() { | |
− | + | if (gridbox.checked) { | |
− | + | xaxis = plotBox.create('axis', [[0, 0], [1,0]], {}); | |
− | + | yaxis = plotBox.create('axis', [[0, 0], [0, 1]], {}); | |
− | + | } else { | |
− | + | xaxis.removeTicks(xaxis.defaultTicks); | |
− | + | yaxis.removeTicks(yaxis.defaultTicks); | |
− | + | } | |
− | + | plotBox.fullUpdate(); | |
− | + | }; | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</script> | </script> | ||
</body> | </body> | ||
</html> | </html> | ||
− | |||
− |
Revision as of 08:35, 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)$$