Applets:Spektrum: Unterschied zwischen den Versionen

Aus LNTwww
Wechseln zu:Navigation, Suche
Zeile 50: Zeile 50:
 
</span></B></p>
 
</span></B></p>
  
 
+
<form id="myForm">
 
<button class="button1" style="font-size:0.750em" onclick="zurueck()">Reset</button>
 
<button class="button1" style="font-size:0.750em" onclick="zurueck()">Reset</button>
 
<p><span style="position:absolute; top:730px; left:840px; font-family:arial; font-size:0.750em;">mit Gitter<input name="gridbox" id="gridbox" type="checkbox" onclick="showgrid();" checked="checked"></span></p>
 
<p><span style="position:absolute; top:730px; left:840px; font-family:arial; font-size:0.750em;">mit Gitter<input name="gridbox" id="gridbox" type="checkbox" onclick="showgrid();" checked="checked"></span></p>
Zeile 64: Zeile 64:
  
 
//Grundeinstellungen der beiden Applets
 
//Grundeinstellungen der beiden Applets
 
+
JXG.Options.text.useMathJax = true;
 
pltBox1 = JXG.JSXGraph.initBoard('pltBox1', {
 
pltBox1 = JXG.JSXGraph.initBoard('pltBox1', {
 
             showCopyright:false, axis:false,
 
             showCopyright:false, axis:false,
Zeile 119: Zeile 119:
 
});
 
});
  
 +
//Festlegen der Schieberegler
 +
sldA1 = cnfBox1.create('slider',[[-2.8,1],[0.8,1],[0,1,2]], {
 +
            suffixlabel:' <I>A</I>_1=',
 +
            snapWidth:0.05
 +
}),
 +
sldDT1 = cnfBox1.create('slider',[[-2.8,0.9],[0.8,0.9],[0,1,2]], {
 +
            suffixlabel:' <I>&#916;t</I>_1=',
 +
            snapWidth:0.01
 +
}),
 +
sldR1 = cnfBox1.create('slider',[[-2.8,0.8],[0.8,0.8],[0,0.5,1]], {
 +
            suffixlabel:' <I>r</I>_1=',
 +
            snapWidth:0.05
 +
}),
 +
sldA2 = cnfBox2.create('slider',[[-2.8,1],[0.8,1],[0,1,2]], {
 +
            suffixlabel:' <I>A</I>_2=',
 +
            snapWidth:0.05
 +
}),
 +
sldDT2 = cnfBox2.create('slider',[[-2.8,0.9],[0.8,0.9],[0,1,2]], {
 +
            suffixlabel:' <I>&#916;t</I>_2=',
 +
            snapWidth:0.05
 +
}),
 +
sldR2 = cnfBox2.create('slider',[[-2.8,0.8],[0.8,0.8],[0,0.5,1]], {
 +
            suffixlabel:' <I>r</I>_2=',
 +
            snapWidth:0.05
 +
}),
 +
sldT = cnfBox3.create('slider',[[-2.8,0.4],[-1.6,0.4],[-1,0.5,1]], {
 +
            suffixlabel:' <I>t</I>=',
 +
            snapWidth:0.05
 +
}),
 +
sldF = cnfBox3.create('slider',[[1,0.4],[2.2,0.4],[-3,0.5,3]], {
 +
            suffixlabel:' <I>f</I>=',
 +
            snapWidth:0.05
 +
}),
 +
 +
//Substituierte Hilfswerte
 +
t1=sldDT1.Value()/2-(sldR1.Value()*sldDT1.Value())/2
 +
t2=(sldR1.Value()*sldDT1.Value())/2+sldDT1.Value()/2
 +
 +
//Definition der Texte für die Funktionswerte von Impuls 1
 +
var txtG1=cnfBox1.create('text',[0,0.1, function()
 +
                          {return '\\[x(t)= '+ Math.round((sldA1.Value()*Math.exp(-1*Math.PI*(sldT.Value()/sldDT1.Value())*(sldT.Value()/sldDT1.Value())))*1000)/1000 +' \\]';}],
 +
            {fixed:true, strokeColor:'red', visible:true});
 +
var txtR1=cnfBox1.create('text',[0,0.1, function(){
 +
            if (Math.abs(sldT.Value())<sldDT1.Value()/2)
 +
                          {return '\\[x(t)= '+ Math.round((sldA1.Value())*1000)/1000 +' \\]';}
 +
            else if(Math.abs(sldT.Value())==sldDT1.Value()/2)
 +
                          {return '\\[x(t)= '+ Math.round((sldA1.Value()/2)*1000)/1000 +' \\]';}
 +
            else
 +
                          {return '\\[x(t)= '+ Math.round((0)*1000)/1000 +' \\]';}}],
 +
            {fixed:true, strokeColor:'red', visible:false});
 +
var txtD1=cnfBox1.create('text',[0,0.1, function(){
 +
        if (Math.abs(sldT.Value())<sldDT1.Value())
 +
                          {return '\\[x(t)= '+ Math.round((sldA1.Value()*(1-Math.abs(sldT.Value())/sldDT1.Value()))*1000)/1000 +' \\]';}
 +
        else
 +
                          {return '\\[x(t)= '+ Math.round((0)*1000)/1000 +' \\]';}}],
 +
        {fixed:true, strokeColor:'red', visible:false});
 +
var txtT1=cnfBox1.create('text',[0,0.1, function(){
 +
            if (Math.abs(sldT.Value())<=(sldDT1.Value()/2-(sldR1.Value()*sldDT1.Value())/2))
 +
                          {return '\\[x(t)= '+ Math.round((sldA1.Value())*1000)/1000 +' \\]';}
 +
            else if (((sldDT1.Value()/2-(sldR1.Value()*sldDT1.Value())/2)<= Math.abs(sldT.Value())) && (Math.abs(sldT.Value())<=((sldR1.Value()*sldDT1.Value())/2+sldDT1.Value()/2)))
 +
                          {return '\\[x(t)= '+ Math.round((sldA1.Value()*(((sldR1.Value()*sldDT1.Value())/2+sldDT1.Value()/2)-Math.abs(sldT.Value()))/(((sldR1.Value()*sldDT1.Value())/2+sldDT1.Value()/2)-(sldDT1.Value()/2-(sldR1.Value()*sldDT1.Value())/2)))*1000)/1000 +' \\]'}
 +
            else
 +
                          {return '\\[x(t)= '+ Math.round((0)*1000)/1000 +' \\]'}}],
 +
            {fixed:true, strokeColor:'red', visible:false});
 +
var txtC1=cnfBox1.create('text',[0,0.1, function(){
 +
            if (Math.abs(sldT.Value())<=(sldDT1.Value()/2-(sldR1.Value()*sldDT1.Value())/2))
 +
                          {return '\\[x(t)= '+ Math.round((sldA1.Value())*1000)/1000 +' \\]';}
 +
            else if (((sldDT1.Value()/2-(sldR1.Value()*sldDT1.Value())/2)<=Math.abs(sldT.Value())) && (Math.abs(sldT.Value())<=((sldR1.Value()*sldDT1.Value())/2+sldDT1.Value()/2)))
 +
                          {return '\\[x(t)= '+ Math.round((sldA1.Value()*Math.cos((Math.abs(sldT.Value())-(sldDT1.Value()/2-(sldR1.Value()*sldDT1.Value())/2))/(((sldR1.Value()*sldDT1.Value())/2+sldDT1.Value()/2)-(sldDT1.Value()/2-(sldR1.Value()*sldDT1.Value())/2))*(Math.PI/2))*Math.cos((Math.abs(sldT.Value())-(sldDT1.Value()/2-(sldR1.Value()*sldDT1.Value())/2))/(((sldR1.Value()*sldDT1.Value())/2+sldDT1.Value()/2)-(sldDT1.Value()/2-(sldR1.Value()*sldDT1.Value())/2))*(Math.PI/2)))*1000)/1000 +' \\]';}
 +
            else
 +
                          {return '\\[x(t)= '+ Math.round((0)*1000)/1000 +' \\]'}}],
 +
            {fixed:true, strokeColor:'red', visible:false});
 +
 +
var txtGS1=cnfBox1.create('text',[0,0, function()
 +
                          {return '\\[X(f)= '+ Math.round((sldA1.Value()*sldDT1.Value()*Math.exp(-1*Math.PI*(sldF.Value()*sldDT1.Value())*(sldF.Value()*sldDT1.Value())))*1000)/1000 +' \\]' ;}],
 +
                          {fixed:true, strokeColor:'red', visible:true});
 +
var txtRS1=cnfBox1.create('text',[0,0, function()
 +
                          {return '\\[X(f)= '+ Math.round((sldA1.Value()*sldDT1.Value()*Math.sin(Math.PI*sldDT1.Value()*sldF.Value())/(Math.PI*sldDT1.Value()*sldF.Value()))*1000)/1000 +' \\]' ;}],
 +
                          {fixed:true, strokeColor:'red', visible:false});
 +
var txtDS1=cnfBox1.create('text',[0,0, function()
 +
                          {return '\\[X(f)= '+ Math.round((sldA1.Value()*sldDT1.Value()*Math.pow(Math.sin(Math.PI*sldDT1.Value()*sldF.Value())/(Math.PI*sldDT1.Value()*sldF.Value()),2))*1000)/1000 +' \\]' ;}],
 +
                          {fixed:true, strokeColor:'red', visible:false});
 +
var txtTS1=cnfBox1.create('text',[0,0, function()
 +
                          {return '\\[X(f)= '+ Math.round((sldA1.Value()*sldDT1.Value()*(Math.sin(Math.PI*sldDT1.Value()*sldF.Value())/(Math.PI*sldDT1.Value()*sldF.Value()))*(Math.sin(Math.PI*sldR1.Value()*sldDT1.Value()*sldF.Value())/(Math.PI*sldR1.Value()*sldDT1.Value()*sldF.Value())))*1000)/1000 +' \\]' ;}],
 +
                          {fixed:true, strokeColor:'red', visible:false});
 +
var txtCS1=cnfBox1.create('text',[0,0, function()
 +
                          {return '\\[X(f)= '+ Math.round((sldA1.Value()*sldDT1.Value()*(Math.cos(Math.PI*sldR1.Value()*sldDT1.Value()*sldF.Value()))/(1-Math.pow((2*sldR1.Value()*sldDT1.Value()*sldF.Value()),2))*(Math.sin(Math.PI*sldDT1.Value()*sldF.Value())/(Math.PI*sldDT1.Value()*sldF.Value())))*1000)/1000 +' \\]' ;}],
 +
                          {fixed:true, strokeColor:'red', visible:false});
 +
 +
//Definition der Texte für die Funktionswerte von Impuls 2
 +
 +
var txtG2=cnfBox2.create('text',[-2,0.1, function()
 +
                          {return '\\[x(t)= '+ Math.round((sldA2.Value()*Math.exp(-1*Math.PI*(sldT.Value()/sldDT2.Value())*(sldT.Value()/sldDT2.Value())))*1000)/1000 +' \\]' ;}],
 +
                          {fixed:true, strokeColor:'blue', visible:false});
 +
var txtR2=cnfBox2.create('text',[-2,0.1, function(){
 +
            if (Math.abs(sldT.Value())<sldDT2.Value()/2)
 +
                          {return '\\[x(t)= '+ Math.round((sldA2.Value())*1000)/1000 +' \\]';}
 +
            else if(Math.abs(sldT.Value())==sldDT2.Value()/2)
 +
                          {return '\\[x(t)= '+ Math.round((sldA2.Value()/2)*1000)/1000 +' \\]';}
 +
            else
 +
                          {return '\\[x(t)= '+ Math.round((0)*1000)/1000 +' \\]';}}],
 +
            {fixed:true, strokeColor:'blue', visible:false});
 +
var txtD2=cnfBox2.create('text',[-2,0.1, function(){
 +
            if (Math.abs(sldT.Value())<sldDT2.Value())
 +
                          {return '\\[x(t)= '+ Math.round((sldA2.Value()*(1-Math.abs(sldT.Value())/sldDT2.Value()))*1000)/1000 +' \\]';}
 +
            else
 +
                          {return '\\[x(t)= '+ Math.round((0)*1000)/1000 +' \\]';}}],
 +
            {fixed:true, strokeColor:'blue', visible:false});
 +
var txtT2=cnfBox2.create('text',[-2,0.1, function(){
 +
            if (Math.abs(sldT.Value())<=(sldDT2.Value()/2-(sldR2.Value()*sldDT2.Value())/2))
 +
                          {return '\\[x(t)= '+ Math.round((sldA2.Value())*1000)/1000 +' \\]';}
 +
            else if (((sldDT2.Value()/2-(sldR2.Value()*sldDT2.Value())/2)<= Math.abs(sldT.Value())) && (Math.abs(sldT.Value())<=((sldR2.Value()*sldDT2.Value())/2+sldDT2.Value()/2)))
 +
                          {return '\\[x(t)= '+ Math.round((sldA2.Value()*(((sldR2.Value()*sldDT2.Value())/2+sldDT2.Value()/2)-Math.abs(sldT.Value()))/(((sldR2.Value()*sldDT2.Value())/2+sldDT2.Value()/2)-(sldDT2.Value()/2-(sldR2.Value()*sldDT2.Value())/2)))*1000)/1000 +' \\]'}
 +
            else
 +
                          {return '\\[x(t)= '+ Math.round((0)*1000)/1000 +' \\]'}}],
 +
            {fixed:true, strokeColor:'blue', visible:true});
 +
var txtC2=cnfBox2.create('text',[-2,0.1, function(){
 +
            if (Math.abs(sldT.Value())<=(sldDT2.Value()/2-(sldR2.Value()*sldDT2.Value())/2))
 +
                          {return '\\[x(t)= '+ Math.round((sldA2.Value())*1000)/1000 +' \\]';}
 +
            else if (((sldDT2.Value()/2-(sldR2.Value()*sldDT2.Value())/2)<=Math.abs(sldT.Value())) && (Math.abs(sldT.Value())<=((sldR2.Value()*sldDT2.Value())/2+sldDT2.Value()/2)))
 +
                          {return '\\[x(t)= '+ Math.round((sldA2.Value()*Math.cos((Math.abs(sldT.Value())-(sldDT2.Value()/2-(sldR2.Value()*sldDT2.Value())/2))/(((sldR2.Value()*sldDT2.Value())/2+sldDT2.Value()/2)-(sldDT2.Value()/2-(sldR2.Value()*sldDT2.Value())/2))*(Math.PI/2))*Math.cos((Math.abs(sldT.Value())-(sldDT2.Value()/2-(sldR2.Value()*sldDT2.Value())/2))/(((sldR2.Value()*sldDT2.Value())/2+sldDT2.Value()/2)-(sldDT2.Value()/2-(sldR2.Value()*sldDT2.Value())/2))*(Math.PI/2)))*1000)/1000 +' \\]';}
 +
            else
 +
                          {return '\\[x(t)= '+ Math.round((0)*1000)/1000 +' \\]'}}],
 +
            {fixed:true, strokeColor:'blue', visible:false});
 +
 +
var txtGS2=cnfBox2.create('text',[-2,0, function()
 +
            {return '\\[X(f)= '+ Math.round((sldA2.Value()*sldDT2.Value()*Math.exp(-1*Math.PI*(sldF.Value()*sldDT2.Value())*(sldF.Value()*sldDT2.Value())))*1000)/1000 +' \\]' ;}],
 +
            {fixed:true, strokeColor:'blue', visible:false});
 +
var txtRS2=cnfBox2.create('text',[-2,0, function()
 +
            {return '\\[X(f)= '+ Math.round((sldA2.Value()*sldDT2.Value()*Math.sin(Math.PI*sldDT2.Value()*sldF.Value())/(Math.PI*sldDT2.Value()*sldF.Value()))*1000)/1000 +' \\]' ;}],
 +
            {fixed:true, strokeColor:'blue', visible:false});
 +
var txtDS2=cnfBox2.create('text',[-2,0, function()
 +
            {return '\\[X(f)= '+ Math.round((sldA2.Value()*sldDT2.Value()*Math.pow(Math.sin(Math.PI*sldDT2.Value()*sldF.Value())/(Math.PI*sldDT2.Value()*sldF.Value()),2))*1000)/1000 +' \\]' ;}],
 +
            {fixed:true, strokeColor:'blue', visible:false});
 +
var txtTS2=cnfBox2.create('text',[-2,0, function()
 +
            {return '\\[X(f)= '+ Math.round((sldA2.Value()*sldDT2.Value()*(Math.sin(Math.PI*sldDT2.Value()*sldF.Value())/(Math.PI*sldDT2.Value()*sldF.Value()))*(Math.sin(Math.PI*sldR2.Value()*sldDT2.Value()*sldF.Value())/(Math.PI*sldR2.Value()*sldDT2.Value()*sldF.Value())))*1000)/1000 +' \\]' ;}],
 +
            {fixed:true, strokeColor:'blue', visible:true});
 +
var txtCS2=cnfBox2.create('text',[-2,0, function()
 +
            {return '\\[X(f)= '+ Math.round((sldA2.Value()*sldDT2.Value()*(Math.cos(Math.PI*sldR2.Value()*sldDT2.Value()*sldF.Value()))/(1-Math.pow((2*sldR2.Value()*sldDT2.Value()*sldF.Value()),2))*(Math.sin(Math.PI*sldDT2.Value()*sldF.Value())/(Math.PI*sldDT2.Value()*sldF.Value())))*1000)/1000 +' \\]' ;}],
 +
            {fixed:true, strokeColor:'blue', visible:false});
 +
 +
 +
//Definition der Zeitfunktionen von Impuls 1
 +
var funcG1 = pltBox1.create('functiongraph',[function(x)
 +
            {return (sldA1.Value()*Math.exp(-1*Math.PI*(x/sldDT1.Value())*(x/sldDT1.Value())))}],
 +
            {strokeColor: "red", visible: true});
 +
var funcR1 = pltBox1.create('functiongraph',[function(x){
 +
            if (Math.abs(x)<sldDT1.Value()/2)
 +
                          {return sldA1.Value();}
 +
            else if(Math.abs(x)==sldDT1.Value()/2)
 +
                          {return sldA1.Value()/2;}
 +
            else
 +
                          {return 0;}}],
 +
            {strokeColor: "red", visible: false});
 +
var funcD1 = pltBox1.create('functiongraph',[function(x){
 +
            if (Math.abs(x)<sldDT1.Value())
 +
                          {return sldA1.Value()*(1-Math.abs(x)/sldDT1.Value());}
 +
            else
 +
                          {return 0;}}],
 +
            {strokeColor: "red", visible: false});
 +
var funcT1 = pltBox1.create('functiongraph',[function(x){
 +
            if (Math.abs(x)<=(sldDT1.Value()/2-(sldR1.Value()*sldDT1.Value())/2))
 +
                          {return sldA1.Value();}
 +
            else if (((sldDT1.Value()/2-(sldR1.Value()*sldDT1.Value())/2)<= Math.abs(x)) && (Math.abs(x)<=((sldR1.Value()*sldDT1.Value())/2+sldDT1.Value()/2)))
 +
                          {return sldA1.Value()*(((sldR1.Value()*sldDT1.Value())/2+sldDT1.Value()/2)-Math.abs(x))/(((sldR1.Value()*sldDT1.Value())/2+sldDT1.Value()/2)-(sldDT1.Value()/2-(sldR1.Value()*sldDT1.Value())/2))}
 +
            else
 +
                          {return 0}}],
 +
            {strokeColor: "red", visible: false});
 +
var funcC1 = pltBox1.create('functiongraph',[function(x){
 +
            if (Math.abs(x)<=(sldDT1.Value()/2-(sldR1.Value()*sldDT1.Value())/2))
 +
                          {return sldA1.Value();}
 +
            else if (((sldDT1.Value()/2-(sldR1.Value()*sldDT1.Value())/2)<=Math.abs(x)) && (Math.abs(x)<=((sldR1.Value()*sldDT1.Value())/2+sldDT1.Value()/2)))
 +
                          {return sldA1.Value()*Math.cos((Math.abs(x)-(sldDT1.Value()/2-(sldR1.Value()*sldDT1.Value())/2))/(((sldR1.Value()*sldDT1.Value())/2+sldDT1.Value()/2)-(sldDT1.Value()/2-(sldR1.Value()*sldDT1.Value())/2))*(Math.PI/2))*Math.cos((Math.abs(x)-(sldDT1.Value()/2-(sldR1.Value()*sldDT1.Value())/2))/(((sldR1.Value()*sldDT1.Value())/2+sldDT1.Value()/2)-(sldDT1.Value()/2-(sldR1.Value()*sldDT1.Value())/2))*(Math.PI/2));}
 +
            else
 +
                          {return 0}}],
 +
            {strokeColor: "red", visible: false});
 +
 +
//Definition der Spektralfunktionen von Impuls 1
 +
var funcGS1 = pltBox2.create('functiongraph',[function(x){
 +
            return (sldA1.Value()*sldDT1.Value()*Math.exp(-1*Math.PI*(x*sldDT1.Value())*(x*sldDT1.Value())))}],
 +
            {strokeColor: "red", visible: true});
 +
var funcRS1 = pltBox2.create('functiongraph',[function(x){
 +
            return (sldA1.Value()*sldDT1.Value()*Math.sin(Math.PI*sldDT1.Value()*x)/(Math.PI*sldDT1.Value()*x))}],
 +
            {strokeColor: "red", visible: false});
 +
var funcDS1 = pltBox2.create('functiongraph',[function(x){
 +
            return (sldA1.Value()*sldDT1.Value()*Math.pow(Math.sin(Math.PI*sldDT1.Value()*x)/(Math.PI*sldDT1.Value()*x),2))}],
 +
            {strokeColor: "red", visible: false});
 +
var funcTS1 = pltBox2.create('functiongraph',[function(x){
 +
            return (sldA1.Value()*sldDT1.Value()*(Math.sin(Math.PI*sldDT1.Value()*x)/(Math.PI*sldDT1.Value()*x))*(Math.sin(Math.PI*sldR1.Value()*sldDT1.Value()*x)/(Math.PI*sldR1.Value()*sldDT1.Value()*x)))}],
 +
            {strokeColor: "red", visible: false});
 +
var funcCS1 = pltBox2.create('functiongraph',[function(x){
 +
            return (sldA1.Value()*sldDT1.Value()*(Math.cos(Math.PI*sldR1.Value()*sldDT1.Value()*x))/(1-Math.pow((2*sldR1.Value()*sldDT1.Value()*x),2))*(Math.sin(Math.PI*sldDT1.Value()*x)/(Math.PI*sldDT1.Value()*x)))}],
 +
            {strokeColor: "red", visible: false});
 +
 +
//Definition der Zeitfunktionen von Impuls 2
 +
var funcG2 = pltBox1.create('functiongraph',[function(x){
 +
            return (sldA2.Value()*Math.exp(-1*Math.PI*(x/sldDT2.Value())*(x/sldDT2.Value())))}],
 +
            {strokeColor: "blue", visible: false});
 +
var funcR2 = pltBox1.create('functiongraph',[function(x){
 +
            if (Math.abs(x)<sldDT2.Value()/2)
 +
                          {return sldA2.Value();}
 +
            else if(Math.abs(x)==sldDT2.Value()/2)
 +
                          {return sldA2.Value()/2;}
 +
            else
 +
                          {return 0;}}],
 +
            {strokeColor: "blue", visible: false});
 +
var funcD2 = pltBox1.create('functiongraph',[function(x){
 +
            if (Math.abs(x)<sldDT2.Value())
 +
                          {return sldA2.Value()*(1-Math.abs(x)/sldDT2.Value());}
 +
            else
 +
                          {return 0;}}],
 +
            {strokeColor: "blue", visible: false});
 +
var funcT2 = pltBox1.create('functiongraph',[function(x){
 +
            if (Math.abs(x)<=(sldDT2.Value()/2-(sldR2.Value()*sldDT2.Value())/2))
 +
                          {return sldA2.Value();}
 +
            else if (((sldDT2.Value()/2-(sldR2.Value()*sldDT2.Value())/2)<= Math.abs(x)) && (Math.abs(x)<=((sldR2.Value()*sldDT2.Value())/2+sldDT2.Value()/2)))
 +
                          {return sldA2.Value()*(((sldR2.Value()*sldDT2.Value())/2+sldDT2.Value()/2)-Math.abs(x))/(((sldR2.Value()*sldDT2.Value())/2+sldDT2.Value()/2)-(sldDT2.Value()/2-(sldR2.Value()*sldDT2.Value())/2))}
 +
            else
 +
                          {return 0}}],
 +
            {strokeColor: "blue", visible: true});
 +
var funcC2 = pltBox1.create('functiongraph',[function(x){
 +
            if (Math.abs(x)<=(sldDT2.Value()/2-(sldR2.Value()*sldDT2.Value())/2))
 +
                          {return sldA2.Value();}
 +
            else if (((sldDT2.Value()/2-(sldR2.Value()*sldDT2.Value())/2)<=Math.abs(x)) && (Math.abs(x)<=((sldR2.Value()*sldDT2.Value())/2+sldDT2.Value()/2)))
 +
                          {return sldA2.Value()*Math.cos((Math.abs(x)-(sldDT2.Value()/2-(sldR2.Value()*sldDT2.Value())/2))/(((sldR2.Value()*sldDT2.Value())/2+sldDT2.Value()/2)-(sldDT2.Value()/2-(sldR2.Value()*sldDT2.Value())/2))*(Math.PI/2))*Math.cos((Math.abs(x)-(sldDT2.Value()/2-(sldR2.Value()*sldDT2.Value())/2))/(((sldR2.Value()*sldDT2.Value())/2+sldDT2.Value()/2)-(sldDT2.Value()/2-(sldR2.Value()*sldDT2.Value())/2))*(Math.PI/2));}
 +
            else
 +
                          {return 0}}],
 +
            {strokeColor: "blue", visible: false});
 +
 +
//Definition der Spektralfunktionen von Impuls 2
 +
var funcGS2 = pltBox2.create('functiongraph',[function(x){
 +
            return (sldA2.Value()*sldDT2.Value()*Math.exp(-1*Math.PI*(x*sldDT2.Value())*(x*sldDT2.Value())))}],
 +
            {strokeColor: "blue", visible: false});
 +
var funcRS2 = pltBox2.create('functiongraph',[function(x){
 +
            return (sldA2.Value()*sldDT2.Value()*Math.sin(Math.PI*sldDT2.Value()*x)/(Math.PI*sldDT2.Value()*x))}],
 +
            {strokeColor: "blue", visible: false});
 +
var funcDS2 = pltBox2.create('functiongraph',[function(x){
 +
            return (sldA2.Value()*sldDT2.Value()*Math.pow(Math.sin(Math.PI*sldDT2.Value()*x)/(Math.PI*sldDT2.Value()*x),2))}],
 +
            {strokeColor: "blue", visible: false});
 +
var funcTS2 = pltBox2.create('functiongraph',[function(x){
 +
            return (sldA2.Value()*sldDT2.Value()*(Math.sin(Math.PI*sldDT2.Value()*x)/(Math.PI*sldDT2.Value()*x))*(Math.sin(Math.PI*sldR2.Value()*sldDT2.Value()*x)/(Math.PI*sldR2.Value()*sldDT2.Value()*x)))}],
 +
            {strokeColor: "blue", visible: true});
 +
var funcCS2 = pltBox2.create('functiongraph',[function(x){
 +
            return (sldA2.Value()*sldDT2.Value()*(Math.cos(Math.PI*sldR2.Value()*sldDT2.Value()*x))/(1-Math.pow((2*sldR2.Value()*sldDT2.Value()*x),2))*(Math.sin(Math.PI*sldDT2.Value()*x)/(Math.PI*sldDT2.Value()*x)))}],
 +
            {strokeColor: "blue", visible: false});
 +
 +
 +
//Definition der Dropdownlisten dropdown1 und dropdown2
 +
var change1 = function(obj) {
 +
var v = obj.value;
 +
if (v=='0')          { impuls1G();}
 +
else if (v=='1')      { impuls1R();}
 +
else if (v=='2')      { impuls1D();}
 +
else if (v=='3')      { impuls1T();}
 +
else if (v=='4')      { impuls1C();}
 +
else if (v=='5')      { impuls1I();}
 +
};
 +
 +
var change2 = function(obj) {
 +
  var v = obj.value;
 +
  if (v=='0')          { impuls2G();}
 +
  else if (v=='1')      { impuls2R();}
 +
  else if (v=='2')      { impuls2D();}
 +
  else if (v=='3')      { impuls2T();}
 +
  else if (v=='4')      { impuls2C();}
 +
  else if (v=='5')      { impuls2I();}
 +
  };
 +
 +
 +
//Definition der Funktionen für dropdown1
 +
function impuls1G() {
 +
            funcG1.setProperty({visible:true});
 +
            funcR1.setProperty({visible:false});
 +
            funcD1.setProperty({visible:false});
 +
            funcT1.setProperty({visible:false});
 +
            funcC1.setProperty({visible:false});
 +
            funcGS1.setProperty({visible:true});
 +
            funcRS1.setProperty({visible:false});
 +
            funcDS1.setProperty({visible:false});
 +
            funcTS1.setProperty({visible:false});
 +
            funcCS1.setProperty({visible:false});
 +
            txtG1.setProperty({visible:true});
 +
            txtR1.setProperty({visible:false});
 +
            txtD1.setProperty({visible:false});
 +
            txtT1.setProperty({visible:false});
 +
            txtC1.setProperty({visible:false});
 +
            txtGS1.setProperty({visible:true});
 +
            txtRS1.setProperty({visible:false});
 +
            txtDS1.setProperty({visible:false});
 +
            txtTS1.setProperty({visible:false});
 +
            txtCS1.setProperty({visible:false});
 +
};
 +
 +
function impuls1R() {
 +
            funcG1.setProperty({visible:false});
 +
            funcR1.setProperty({visible:true});
 +
            funcD1.setProperty({visible:false});
 +
            funcT1.setProperty({visible:false});
 +
            funcC1.setProperty({visible:false});
 +
            funcGS1.setProperty({visible:false});
 +
            funcRS1.setProperty({visible:true});
 +
            funcDS1.setProperty({visible:false});
 +
            funcTS1.setProperty({visible:false});
 +
            funcCS1.setProperty({visible:false});
 +
            txtG1.setProperty({visible:false});
 +
            txtR1.setProperty({visible:true});
 +
            txtD1.setProperty({visible:false});
 +
            txtT1.setProperty({visible:false});
 +
            txtC1.setProperty({visible:false});
 +
            txtGS1.setProperty({visible:false});
 +
            txtRS1.setProperty({visible:true});
 +
            txtDS1.setProperty({visible:false});
 +
            txtTS1.setProperty({visible:false});
 +
            txtCS1.setProperty({visible:false});
 +
};
 +
 +
function impuls1D() {
 +
            funcG1.setProperty({visible:false});
 +
            funcR1.setProperty({visible:false});
 +
            funcD1.setProperty({visible:true});
 +
            funcT1.setProperty({visible:false});
 +
            funcC1.setProperty({visible:false});
 +
            funcGS1.setProperty({visible:false});
 +
            funcRS1.setProperty({visible:true});
 +
            funcDS1.setProperty({visible:false});
 +
            funcTS1.setProperty({visible:false});
 +
            funcCS1.setProperty({visible:false});
 +
            txtG1.setProperty({visible:false});
 +
            txtR1.setProperty({visible:false});
 +
            txtD1.setProperty({visible:true});
 +
            txtT1.setProperty({visible:false});
 +
            txtC1.setProperty({visible:false});
 +
            txtGS1.setProperty({visible:false});
 +
            txtRS1.setProperty({visible:false});
 +
            txtDS1.setProperty({visible:true});
 +
            txtTS1.setProperty({visible:false});
 +
            txtCS1.setProperty({visible:false});
 +
};
 +
 +
function impuls1T() {
 +
            funcG1.setProperty({visible:false});
 +
            funcR1.setProperty({visible:false});
 +
            funcD1.setProperty({visible:false});
 +
            funcT1.setProperty({visible:true});
 +
            funcC1.setProperty({visible:false});
 +
            funcGS1.setProperty({visible:false});
 +
            funcRS1.setProperty({visible:false});
 +
            funcDS1.setProperty({visible:false});
 +
            funcTS1.setProperty({visible:true});
 +
            funcCS1.setProperty({visible:false});
 +
            txtG1.setProperty({visible:false});
 +
            txtR1.setProperty({visible:false});
 +
            txtD1.setProperty({visible:false});
 +
            txtT1.setProperty({visible:true});
 +
            txtC1.setProperty({visible:false});
 +
            txtGS1.setProperty({visible:false});
 +
            txtRS1.setProperty({visible:false});
 +
            txtDS1.setProperty({visible:false});
 +
            txtTS1.setProperty({visible:true});
 +
            txtCS1.setProperty({visible:false});
 +
};
 +
 +
function impuls1C() {
 +
            funcG1.setProperty({visible:false});
 +
            funcR1.setProperty({visible:false});
 +
            funcD1.setProperty({visible:false});
 +
            funcT1.setProperty({visible:false});
 +
            funcC1.setProperty({visible:true});
 +
            funcGS1.setProperty({visible:false});
 +
            funcRS1.setProperty({visible:false});
 +
            funcDS1.setProperty({visible:false});
 +
            funcTS1.setProperty({visible:false});
 +
            funcCS1.setProperty({visible:true});
 +
            txtG1.setProperty({visible:false});
 +
            txtR1.setProperty({visible:false});
 +
            txtD1.setProperty({visible:false});
 +
            txtT1.setProperty({visible:false});
 +
            txtC1.setProperty({visible:true});
 +
            txtGS1.setProperty({visible:false});
 +
            txtRS1.setProperty({visible:false});
 +
            txtDS1.setProperty({visible:false});
 +
            txtTS1.setProperty({visible:false});
 +
            txtCS1.setProperty({visible:true});
 +
};
 +
 +
function impuls1I() {
 +
            funcG1.setProperty({visible:false});
 +
            funcR1.setProperty({visible:false});
 +
            funcD1.setProperty({visible:false});
 +
            funcT1.setProperty({visible:false});
 +
            funcC1.setProperty({visible:false});
 +
            funcGS1.setProperty({visible:false});
 +
            funcRS1.setProperty({visible:false});
 +
            funcDS1.setProperty({visible:false});
 +
            funcTS1.setProperty({visible:false});
 +
            funcCS1.setProperty({visible:false});
 +
            txtG1.setProperty({visible:false});
 +
            txtR1.setProperty({visible:false});
 +
            txtD1.setProperty({visible:false});
 +
            txtT1.setProperty({visible:false});
 +
            txtC1.setProperty({visible:false});
 +
            txtGS1.setProperty({visible:false});
 +
            txtRS1.setProperty({visible:false});
 +
            txtDS1.setProperty({visible:false});
 +
            txtTS1.setProperty({visible:false});
 +
            txtCS1.setProperty({visible:false});
 +
};
 +
 +
//Definition der Funktionen für dropdown1
 +
 +
function impuls2G() {
 +
            funcG2.setProperty({visible:true});
 +
            funcR2.setProperty({visible:false});
 +
            funcD2.setProperty({visible:false});
 +
            funcT2.setProperty({visible:false});
 +
            funcC2.setProperty({visible:false});
 +
            funcGS2.setProperty({visible:true});
 +
            funcRS2.setProperty({visible:false});
 +
            funcDS2.setProperty({visible:false});
 +
            funcTS2.setProperty({visible:false});
 +
            funcCS2.setProperty({visible:false});
 +
            txtG2.setProperty({visible:true});
 +
            txtR2.setProperty({visible:false});
 +
            txtD2.setProperty({visible:false});
 +
            txtT2.setProperty({visible:false});
 +
            txtC2.setProperty({visible:false});
 +
            txtGS2.setProperty({visible:true});
 +
            txtRS2.setProperty({visible:false});
 +
            txtDS2.setProperty({visible:false});
 +
            txtTS2.setProperty({visible:false});
 +
            txtCS2.setProperty({visible:false});
 +
};
  
 +
function impuls2R() {
 +
            funcG2.setProperty({visible:false});
 +
            funcR2.setProperty({visible:true});
 +
            funcD2.setProperty({visible:false});
 +
            funcT2.setProperty({visible:false});
 +
            funcC2.setProperty({visible:false});
 +
            funcGS2.setProperty({visible:false});
 +
            funcRS2.setProperty({visible:true});
 +
            funcDS2.setProperty({visible:false});
 +
            funcTS2.setProperty({visible:false});
 +
            funcCS2.setProperty({visible:false});
 +
            txtG2.setProperty({visible:false});
 +
            txtR2.setProperty({visible:true});
 +
            txtD2.setProperty({visible:false});
 +
            txtT2.setProperty({visible:false});
 +
            txtC2.setProperty({visible:false});
 +
            txtGS2.setProperty({visible:false});
 +
            txtRS2.setProperty({visible:true});
 +
            txtDS2.setProperty({visible:false});
 +
            txtTS2.setProperty({visible:false});
 +
            txtCS2.setProperty({visible:false});
 +
};
  
 +
function impuls2D() {
 +
            funcG2.setProperty({visible:false});
 +
            funcR2.setProperty({visible:false});
 +
            funcD2.setProperty({visible:true});
 +
            funcT2.setProperty({visible:false});
 +
            funcC2.setProperty({visible:false});
 +
            funcGS2.setProperty({visible:false});
 +
            funcRS2.setProperty({visible:true});
 +
            funcDS2.setProperty({visible:false});
 +
            funcTS2.setProperty({visible:false});
 +
            funcCS2.setProperty({visible:false});
 +
            txtG2.setProperty({visible:false});
 +
            txtR2.setProperty({visible:false});
 +
            txtD2.setProperty({visible:true});
 +
            txtT2.setProperty({visible:false});
 +
            txtC2.setProperty({visible:false});
 +
            txtGS2.setProperty({visible:false});
 +
            txtRS2.setProperty({visible:false});
 +
            txtDS2.setProperty({visible:true});
 +
            txtTS2.setProperty({visible:false});
 +
            txtCS2.setProperty({visible:false});
 +
};
 +
 +
function impuls2T() {
 +
            funcG2.setProperty({visible:false});
 +
            funcR2.setProperty({visible:false});
 +
            funcD2.setProperty({visible:false});
 +
            funcT2.setProperty({visible:true});
 +
            funcC2.setProperty({visible:false});
 +
            funcGS2.setProperty({visible:false});
 +
            funcRS2.setProperty({visible:false});
 +
            funcDS2.setProperty({visible:false});
 +
            funcTS2.setProperty({visible:true});
 +
            funcCS2.setProperty({visible:false});
 +
            txtG2.setProperty({visible:false});
 +
            txtR2.setProperty({visible:false});
 +
            txtD2.setProperty({visible:false});
 +
            txtT2.setProperty({visible:true});
 +
            txtC2.setProperty({visible:false});
 +
            txtGS2.setProperty({visible:false});
 +
            txtRS2.setProperty({visible:false});
 +
            txtDS2.setProperty({visible:false});
 +
            txtTS2.setProperty({visible:true});
 +
            txtCS2.setProperty({visible:false});
 +
};
 +
 +
function impuls2C() {
 +
            funcG2.setProperty({visible:false});
 +
            funcR2.setProperty({visible:false});
 +
            funcD2.setProperty({visible:false});
 +
            funcT2.setProperty({visible:false});
 +
            funcC2.setProperty({visible:true});
 +
            funcGS2.setProperty({visible:false});
 +
            funcRS2.setProperty({visible:false});
 +
            funcDS2.setProperty({visible:false});
 +
            funcTS2.setProperty({visible:false});
 +
            funcCS2.setProperty({visible:true});
 +
            txtG2.setProperty({visible:false});
 +
            txtR2.setProperty({visible:false});
 +
            txtD2.setProperty({visible:false});
 +
            txtT2.setProperty({visible:false});
 +
            txtC2.setProperty({visible:true});
 +
            txtGS2.setProperty({visible:false});
 +
            txtRS2.setProperty({visible:false});
 +
            txtDS2.setProperty({visible:false});
 +
            txtTS2.setProperty({visible:false});
 +
            txtCS2.setProperty({visible:true});
 +
};
 +
 +
function impuls2I() {
 +
            funcG2.setProperty({visible:false});
 +
            funcR2.setProperty({visible:false});
 +
            funcD2.setProperty({visible:false});
 +
            funcT2.setProperty({visible:false});
 +
            funcC2.setProperty({visible:false});
 +
            funcGS2.setProperty({visible:false});
 +
            funcRS2.setProperty({visible:false});
 +
            funcDS2.setProperty({visible:false});
 +
            funcTS2.setProperty({visible:false});
 +
            funcCS2.setProperty({visible:false});
 +
            txtG2.setProperty({visible:false});
 +
            txtR2.setProperty({visible:false});
 +
            txtD2.setProperty({visible:false});
 +
            txtT2.setProperty({visible:false});
 +
            txtC2.setProperty({visible:false});
 +
            txtGS2.setProperty({visible:false});
 +
            txtRS2.setProperty({visible:false});
 +
            txtDS2.setProperty({visible:false});
 +
            txtTS2.setProperty({visible:false});
 +
            txtCS2.setProperty({visible:false});
 +
};
 +
 +
 +
 +
//Definition der Zeige und Verstecke Koordinatensystemfunktion
 +
 +
function showgrid() {
 +
            if (gridbox.checked) {
 +
                          xaxis1 = pltBox1.create('axis', [[0, 0], [1,0]], {});
 +
                          yaxis1 = pltBox1.create('axis', [[0, 0], [0, 1]], {});
 +
                          xaxis2 = pltBox2.create('axis', [[0, 0], [1, 0]], {});
 +
                          yaxis2 = pltBox2.create('axis', [[0, 0], [0, 1]], {});
 +
}
 +
            else {
 +
                          xaxis1.removeTicks(xaxis1.defaultTicks);
 +
                          yaxis1.removeTicks(yaxis1.defaultTicks);
 +
                          xaxis2.removeTicks(xaxis2.defaultTicks);
 +
                          yaxis2.removeTicks(yaxis2.defaultTicks);
 +
}
 +
                          pltBox1.fullUpdate();
 +
                          pltBox2.fullUpdate();
 +
};
 
</script>
 
</script>
 +
 +
</form>
 +
 +
<script>
 +
 +
//Definition des Reset-Buttons
 +
function zurueck() {
 +
    document.getElementById("myForm").reset();
 +
};
 +
</script>
 +
 
</body>
 
</body>
 
</html>
 
</html>
 +
 +
{{Display}}

Version vom 18. September 2017, 13:56 Uhr

Impuls 1

Impuls 2

mit Gitter