Difference between revisions of "Applets:Spektrum"
From LNTwww
David.Jobst (talk | contribs) |
David.Jobst (talk | contribs) |
||
Line 193: | Line 193: | ||
{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 +' \\]' ;}], | {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}); | {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}); | ||
//Definition der Zeige und Verstecke Koordinatensystemfunktion | //Definition der Zeige und Verstecke Koordinatensystemfunktion |
Revision as of 14:13, 18 September 2017
Impuls 1
Impuls 2