Difference between revisions of "Applets:Spektrum"
From LNTwww
David.Jobst (talk | contribs) |
David.Jobst (talk | contribs) |
||
Line 154: | Line 154: | ||
+ | //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}); | ||
− | |||
Revision as of 14:03, 18 September 2017
Impuls 1
Impuls 2