Difference between revisions of "Applets:Periodendauer periodischer Signale"

From LNTwww
Line 1: Line 1:
{{LntExplicitLoadMathjax}}
 
 
 
<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" />
+
  <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://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://en.lntwww.de/MathJax/unpacked/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full,local/mwMathJaxConfig"></script> -->
    <style>
+
  <!-- <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:
 
         }
 
         }
  
        table {
+
  </style>
            border-collapse: separate;
 
            border-spacing: 20px 0;
 
        }
 
    </style>
 
 
</head>
 
</head>
  
  
  
<body>
+
<body onload="drawNow()">
<form id="jxgForm">
+
<!-- Resetbutton, Checkbox und Formel -->
    <!-- Resetbutton, Checkbox, Regler und Plots -->
+
<p>
    <p>
+
    <input type="checkbox" id="gridbox" onclick="showgrid();" checked> <label for="gridbox">Gitterlinien zeigen</label>
        <input type="checkbox" id="gridbox" onclick="showgrid();" checked> <label for="gridbox">Gitterlinien Zeigen</label>
+
    <button class="button" onclick="drawNow();">Reset</button>
        <button class="button" onclick="rst()">Reset</button>
+
</p>
    </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:100px; float:top; margin:-10px 20px 100px 0px;"></div>
+
<div id="cnfBoxHtml" class="jxgbox" style="width:600px; height:150px; margin:-760px 20px 0px 0px;"></div>
    <div id="pltBoxHtml" class="jxgbox" style="width:600px; height:600px; border:1px solid black; margin:-10px 20px 100px 0px;"></div>
 
</form>
 
 
 
<!-- Ausgabefelder -->
 
<table>
 
    <tr>
 
        <td>$x(t)$=    <span id="x(t)"></span>    </td>
 
        <td>$x(t+ T_0)$=<span id="x(t+T_0)"></span> </td>
 
        <td>$x(t+2T_0)$=<span id="x(t+2T_0)"></span></td>
 
    </tr>
 
    <tr>
 
        <td>$x_{\text{max}}$=<span id="x_max"></span></td>
 
        <td>$T_0$=          <span id="T_0"></span>  </td>
 
    </tr>
 
</table>
 
  
  
 
<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
    // Definition der Funktion zum An- und Ausschalten des Koordinatengitters
+
function showgrid() {
    function showgrid() {
+
    if (gridbox.checked) {
        if (gridbox.checked) {
+
      xaxis = plotBox.create('axis', [[0, 0], [1,0]], {});
            xaxis = pltBox.create('axis', [ [0, 0], [1, 0] ], {});
+
      yaxis = plotBox.create('axis', [[0, 0], [0, 1]], {});
            yaxis = pltBox.create('axis', [ [0, 0], [0, 1] ], {});
+
    } else {
        } else {
+
    xaxis.removeTicks(xaxis.defaultTicks);
            xaxis.removeTicks(xaxis.defaultTicks);
+
    yaxis.removeTicks(yaxis.defaultTicks);
            yaxis.removeTicks(yaxis.defaultTicks);
+
    }
        }
+
    plotBox.fullUpdate();
        pltBox.fullUpdate();
+
};
    };
 
 
 
    // Definition des Reset-Buttons
 
    function rst() {
 
        document.getElementById("jxgForm").reset();
 
    };
 
 
</script>
 
</script>
 
</body>
 
</body>
 
</html>
 
</html>
 
{{Display}}
 

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)$$