Applets:Spektrum: Unterschied zwischen den Versionen

Aus LNTwww
Wechseln zu:Navigation, Suche
Zeile 103: Zeile 103:
 
//Einstellungen der Achsen
 
//Einstellungen der Achsen
 
xaxis1 = pltBox1.create('axis', [[0, 0], [1,0]], {
 
xaxis1 = pltBox1.create('axis', [[0, 0], [1,0]], {
             name:'\\[t\\]',
+
             name:'$t$',
 
             withLabel:true, label:{position:'rt', offset:[-25, 15]}
 
             withLabel:true, label:{position:'rt', offset:[-25, 15]}
 
});
 
});
 
yaxis1 = pltBox1.create('axis', [[0, 0], [0, 1]], {
 
yaxis1 = pltBox1.create('axis', [[0, 0], [0, 1]], {
             name:'\\[x(t)\\]',
+
             name:'$x(t)$',
 
             withLabel:true, label:{position:'rt', offset:[10, -5]}
 
             withLabel:true, label:{position:'rt', offset:[10, -5]}
 
});
 
});
 
xaxis2 = pltBox2.create('axis', [[0, 0], [1,0]], {
 
xaxis2 = pltBox2.create('axis', [[0, 0], [1,0]], {
             name:'\\[f\\]',
+
             name:'$f$',
 
             withLabel:true, label:{position:'rt', offset:[-25, 15]}
 
             withLabel:true, label:{position:'rt', offset:[-25, 15]}
 
});
 
});
 
yaxis2 = pltBox2.create('axis', [[0, 0], [0, 1]], {
 
yaxis2 = pltBox2.create('axis', [[0, 0], [0, 1]], {
             name:'\\[X(f)\\]',
+
             name:'$X(f)$',
 
             withLabel:true, label:{position:'rt', offset:[10, -5]}
 
             withLabel:true, label:{position:'rt', offset:[10, -5]}
 
});
 
});
Zeile 121: Zeile 121:
 
//Festlegen der Schieberegler
 
//Festlegen der Schieberegler
 
sldA1 = cnfBox1.create('slider',[[-2.8,1],[0.8,1],[0,1,2]], {
 
sldA1 = cnfBox1.create('slider',[[-2.8,1],[0.8,1],[0,1,2]], {
             suffixlabel:' <I>A</I>_1=',
+
             suffixlabel:' $A_1$=',
 
             snapWidth:0.05
 
             snapWidth:0.05
 
}),
 
}),
 
sldDT1 = cnfBox1.create('slider',[[-2.8,0.9],[0.8,0.9],[0,1,2]], {
 
sldDT1 = cnfBox1.create('slider',[[-2.8,0.9],[0.8,0.9],[0,1,2]], {
             suffixlabel:' <I>&#916;t</I>_1=',
+
             suffixlabel:' $&#916;t_1$=',
 
             snapWidth:0.01
 
             snapWidth:0.01
 
}),
 
}),
 
sldR1 = cnfBox1.create('slider',[[-2.8,0.8],[0.8,0.8],[0,0.5,1]], {
 
sldR1 = cnfBox1.create('slider',[[-2.8,0.8],[0.8,0.8],[0,0.5,1]], {
             suffixlabel:' <I>r</I>_1=',
+
             suffixlabel:' $r_1$=',
 
             snapWidth:0.05
 
             snapWidth:0.05
 
}),
 
}),
 
sldA2 = cnfBox2.create('slider',[[-2.8,1],[0.8,1],[0,1,2]], {
 
sldA2 = cnfBox2.create('slider',[[-2.8,1],[0.8,1],[0,1,2]], {
             suffixlabel:' <I>A</I>_2=',
+
             suffixlabel:' $A_2$=',
 
             snapWidth:0.05
 
             snapWidth:0.05
 
}),
 
}),
 
sldDT2 = cnfBox2.create('slider',[[-2.8,0.9],[0.8,0.9],[0,1,2]], {
 
sldDT2 = cnfBox2.create('slider',[[-2.8,0.9],[0.8,0.9],[0,1,2]], {
             suffixlabel:' <I>&#916;t</I>_2=',
+
             suffixlabel:' $&#916;t_2$=',
 
             snapWidth:0.05
 
             snapWidth:0.05
 
}),
 
}),
 
sldR2 = cnfBox2.create('slider',[[-2.8,0.8],[0.8,0.8],[0,0.5,1]], {
 
sldR2 = cnfBox2.create('slider',[[-2.8,0.8],[0.8,0.8],[0,0.5,1]], {
             suffixlabel:' <I>r</I>_2=',
+
             suffixlabel:' $r_2$=',
 
             snapWidth:0.05
 
             snapWidth:0.05
 
}),
 
}),
 
sldT = cnfBox3.create('slider',[[-2.8,0.4],[-1.6,0.4],[-1,0.5,1]], {
 
sldT = cnfBox3.create('slider',[[-2.8,0.4],[-1.6,0.4],[-1,0.5,1]], {
             suffixlabel:' <I>t</I>=',
+
             suffixlabel:' $t=$',
 
             snapWidth:0.05
 
             snapWidth:0.05
 
}),
 
}),
 
sldF = cnfBox3.create('slider',[[1,0.4],[2.2,0.4],[-3,0.5,3]], {
 
sldF = cnfBox3.create('slider',[[1,0.4],[2.2,0.4],[-3,0.5,3]], {
             suffixlabel:' <I>f</I>=',
+
             suffixlabel:' $f=$',
 
             snapWidth:0.05
 
             snapWidth:0.05
 
}),
 
}),
Zeile 159: Zeile 159:
 
//Definition der Texte für die Funktionswerte von Impuls 1
 
//Definition der Texte für die Funktionswerte von Impuls 1
 
var txtG1=cnfBox1.create('text',[0,0.1, function()
 
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 +' \\]';}],
+
                           {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});
 
             {fixed:true, strokeColor:'red', visible:true});
 
var txtR1=cnfBox1.create('text',[0,0.1, function(){
 
var txtR1=cnfBox1.create('text',[0,0.1, function(){
 
             if (Math.abs(sldT.Value())<sldDT1.Value()/2)
 
             if (Math.abs(sldT.Value())<sldDT1.Value()/2)
                           {return '\\[x(t)= '+ Math.round((sldA1.Value())*1000)/1000 +' \\]';}
+
                           {return '$x(t)= '+ Math.round((sldA1.Value())*1000)/1000 +' $';}
 
             else if(Math.abs(sldT.Value())==sldDT1.Value()/2)
 
             else if(Math.abs(sldT.Value())==sldDT1.Value()/2)
                           {return '\\[x(t)= '+ Math.round((sldA1.Value()/2)*1000)/1000 +' \\]';}
+
                           {return '$x(t)= '+ Math.round((sldA1.Value()/2)*1000)/1000 +' $';}
 
             else
 
             else
                           {return '\\[x(t)= '+ Math.round((0)*1000)/1000 +' \\]';}}],
+
                           {return '$x(t)= '+ Math.round((0)*1000)/1000 +' $';}}],
 
             {fixed:true, strokeColor:'red', visible:false});
 
             {fixed:true, strokeColor:'red', visible:false});
 
var txtD1=cnfBox1.create('text',[0,0.1, function(){
 
var txtD1=cnfBox1.create('text',[0,0.1, function(){
 
         if (Math.abs(sldT.Value())<sldDT1.Value())
 
         if (Math.abs(sldT.Value())<sldDT1.Value())
                           {return '\\[x(t)= '+ Math.round((sldA1.Value()*(1-Math.abs(sldT.Value())/sldDT1.Value()))*1000)/1000 +' \\]';}
+
                           {return '$x(t)= '+ Math.round((sldA1.Value()*(1-Math.abs(sldT.Value())/sldDT1.Value()))*1000)/1000 +' $';}
 
         else
 
         else
                           {return '\\[x(t)= '+ Math.round((0)*1000)/1000 +' \\]';}}],
+
                           {return '$x(t)= '+ Math.round((0)*1000)/1000 +' $';}}],
 
         {fixed:true, strokeColor:'red', visible:false});
 
         {fixed:true, strokeColor:'red', visible:false});
  
  
 
var txtGS1=cnfBox1.create('text',[0,0, function()
 
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 +' \\]' ;}],
+
                           {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});
 
                           {fixed:true, strokeColor:'red', visible:true});
 
var txtRS1=cnfBox1.create('text',[0,0, function()
 
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 +' \\]' ;}],
+
                           {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});
 
                           {fixed:true, strokeColor:'red', visible:false});
 
var txtDS1=cnfBox1.create('text',[0,0, function()
 
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 +' \\]' ;}],
+
                           {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});
 
                           {fixed:true, strokeColor:'red', visible:false});
  
Zeile 191: Zeile 191:
  
 
var txtG2=cnfBox2.create('text',[-2,0.1, function()
 
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 +' \\]' ;}],
+
                           {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});
 
                           {fixed:true, strokeColor:'blue', visible:false});
 
var txtR2=cnfBox2.create('text',[-2,0.1, function(){
 
var txtR2=cnfBox2.create('text',[-2,0.1, function(){
 
             if (Math.abs(sldT.Value())<sldDT2.Value()/2)
 
             if (Math.abs(sldT.Value())<sldDT2.Value()/2)
                           {return '\\[x(t)= '+ Math.round((sldA2.Value())*1000)/1000 +' \\]';}
+
                           {return '$x(t)= '+ Math.round((sldA2.Value())*1000)/1000 +' $';}
 
             else if(Math.abs(sldT.Value())==sldDT2.Value()/2)
 
             else if(Math.abs(sldT.Value())==sldDT2.Value()/2)
                           {return '\\[x(t)= '+ Math.round((sldA2.Value()/2)*1000)/1000 +' \\]';}
+
                           {return '$x(t)= '+ Math.round((sldA2.Value()/2)*1000)/1000 +' $';}
 
             else
 
             else
                           {return '\\[x(t)= '+ Math.round((0)*1000)/1000 +' \\]';}}],
+
                           {return '$x(t)= '+ Math.round((0)*1000)/1000 +' $';}}],
 
             {fixed:true, strokeColor:'blue', visible:false});
 
             {fixed:true, strokeColor:'blue', visible:false});
 
var txtD2=cnfBox2.create('text',[-2,0.1, function(){
 
var txtD2=cnfBox2.create('text',[-2,0.1, function(){
 
             if (Math.abs(sldT.Value())<sldDT2.Value())
 
             if (Math.abs(sldT.Value())<sldDT2.Value())
                           {return '\\[x(t)= '+ Math.round((sldA2.Value()*(1-Math.abs(sldT.Value())/sldDT2.Value()))*1000)/1000 +' \\]';}
+
                           {return '$x(t)= '+ Math.round((sldA2.Value()*(1-Math.abs(sldT.Value())/sldDT2.Value()))*1000)/1000 +' $';}
 
             else
 
             else
                           {return '\\[x(t)= '+ Math.round((0)*1000)/1000 +' \\]';}}],
+
                           {return '$x(t)= '+ Math.round((0)*1000)/1000 +' $';}}],
 
             {fixed:true, strokeColor:'blue', visible:false});
 
             {fixed:true, strokeColor:'blue', visible:false});
  
 
var txtGS2=cnfBox2.create('text',[-2,0, function()
 
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 +' \\]' ;}],
+
             {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});
 
             {fixed:true, strokeColor:'blue', visible:false});
 
var txtRS2=cnfBox2.create('text',[-2,0, function()
 
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 +' \\]' ;}],
+
             {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});
 
             {fixed:true, strokeColor:'blue', visible:false});
 
var txtDS2=cnfBox2.create('text',[-2,0, function()
 
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 +' \\]' ;}],
+
             {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});
 
             {fixed:true, strokeColor:'blue', visible:false});
  

Version vom 18. September 2017, 14:30 Uhr

Impuls 1

Impuls 2

mit Gitter