Difference between revisions of "Applets:Periodendauer periodischer Signale"
From LNTwww
David.Jobst (talk | contribs) |
David.Jobst (talk | contribs) |
||
Line 76: | Line 76: | ||
//Definition der Ausgabefelder | //Definition der Ausgabefelder | ||
texta=brd2.create('text',[3.2,1.7, function() | texta=brd2.create('text',[3.2,1.7, function() | ||
− | { return '\\[A_1= '+ Math.round(a.Value()*100)/100 +' \\text{ V}\\]';}], {fixed:true, visible:true}); | + | { return '\\[A_1= '+ Math.round(a.Value()*100)/100 +' \\text{ V}\\]';}], {fixed:true, visible:true, fontSize:14}); |
textb=brd2.create('text',[3.2,0.7, function() | textb=brd2.create('text',[3.2,0.7, function() | ||
− | { return '\\[f_1= '+ Math.round(b.Value()*100)/100 +' \\text{ kHz}\\]';}], {fixed:true, visible:true}); | + | { return '\\[f_1= '+ Math.round(b.Value()*100)/100 +' \\text{ kHz}\\]';}], {fixed:true, visible:true, fontSize:14}); |
textc=brd2.create('text',[3.2,-0.3, function() | textc=brd2.create('text',[3.2,-0.3, function() | ||
− | { return '\\[\\phi_1= '+ Math.round(c.Value()*100)/100 +' \\text{ Grad}\\]';}], {fixed:true, visible:true}); | + | { return '\\[\\phi_1= '+ Math.round(c.Value()*100)/100 +' \\text{ Grad}\\]';}], {fixed:true, visible:true, fontSize:14}); |
textd=brd2.create('text',[9.9,1.57, function() | textd=brd2.create('text',[9.9,1.57, function() | ||
− | { return '\\[A_2= '+ Math.round(d.Value()*100)/100 +' \\text{ V}\\]';}], {fixed:true, visible:true}); | + | { return '\\[A_2= '+ Math.round(d.Value()*100)/100 +' \\text{ V}\\]';}], {fixed:true, visible:true, fontSize:14}); |
texte=brd2.create('text',[9.9,0.57, function() | texte=brd2.create('text',[9.9,0.57, function() | ||
− | { return '\\[f_2= '+ Math.round(e.Value()*100)/100 +' \\text{ kHz}\\]';}], {fixed:true, visible:true}); | + | { return '\\[f_2= '+ Math.round(e.Value()*100)/100 +' \\text{ kHz}\\]';}], {fixed:true, visible:true, fontSize:14}); |
textg=brd2.create('text',[9.9,-0.43, function() | textg=brd2.create('text',[9.9,-0.43, function() | ||
− | { return '\\[\\phi_2= '+ Math.round(g.Value()*100)/100 +' \\text{ Grad}\\]';}], {fixed:true, visible:true}); | + | { return '\\[\\phi_2= '+ Math.round(g.Value()*100)/100 +' \\text{ Grad}\\]';}], {fixed:true, visible:true, fontSize:14}); |
textt=brd2.create('text',[3.2,-1.3, function() | textt=brd2.create('text',[3.2,-1.3, function() | ||
{ return '\\[t= '+ Math.round(t.Value()*100)/100 +' \\]';}], {fixed:true, visible:true, fontSize:14}); | { return '\\[t= '+ Math.round(t.Value()*100)/100 +' \\]';}], {fixed:true, visible:true, fontSize:14}); | ||
textergebnis1=brd3.create('text',[-0.5,1.5, function() | textergebnis1=brd3.create('text',[-0.5,1.5, function() | ||
− | { return '\\[x(t)= '+ Math.round((a.Value()*Math.cos(2*Math.PI*b.Value()*t.Value()-2*Math.PI*c.Value()/360)+d.Value()*Math.cos(2*Math.PI*e.Value()*t.Value()-2*Math.PI*g.Value()/360))*1000)/1000 +' \\]';}], {fixed:true, visible:true}); | + | { return '\\[x(t)= '+ Math.round((a.Value()*Math.cos(2*Math.PI*b.Value()*t.Value()-2*Math.PI*c.Value()/360)+d.Value()*Math.cos(2*Math.PI*e.Value()*t.Value()-2*Math.PI*g.Value()/360))*1000)/1000 +' \\]';}], {fixed:true, visible:true, fontSize:14}); |
textergebnis2=brd3.create('text',[1.6,1.5, function() | textergebnis2=brd3.create('text',[1.6,1.5, function() | ||
− | { return '\\[x(t+T_0)= '+ Math.round((a.Value()*Math.cos(2*Math.PI*b.Value()*(t.Value()+Math.round(getT0() *1000)/1000)-c.Value())+d.Value()*Math.cos(2*Math.PI*e.Value()*(t.Value()+Math.round(getT0() *1000)/1000)-g.Value()))*1000)/1000 +' \\]';}], {fixed:true, visible:true}); | + | { return '\\[x(t+T_0)= '+ Math.round((a.Value()*Math.cos(2*Math.PI*b.Value()*(t.Value()+Math.round(getT0() *1000)/1000)-c.Value())+d.Value()*Math.cos(2*Math.PI*e.Value()*(t.Value()+Math.round(getT0() *1000)/1000)-g.Value()))*1000)/1000 +' \\]';}], {fixed:true, visible:true, fontSize:14}); |
textergebnis3=brd3.create('text',[4.5,1.5, function() | textergebnis3=brd3.create('text',[4.5,1.5, function() | ||
− | { return '\\[x(t+2T_0)= '+ Math.round((a.Value()*Math.cos(2*Math.PI*b.Value()*(t.Value()+2*Math.round(getT0() *1000)/1000)-c.Value())+d.Value()*Math.cos(2*Math.PI*e.Value()*(t.Value()+2*Math.round(getT0() *1000)/1000)-g.Value()))*1000)/1000 +' \\]';}], {fixed:true, visible:true}); | + | { return '\\[x(t+2T_0)= '+ Math.round((a.Value()*Math.cos(2*Math.PI*b.Value()*(t.Value()+2*Math.round(getT0() *1000)/1000)-c.Value())+d.Value()*Math.cos(2*Math.PI*e.Value()*(t.Value()+2*Math.round(getT0() *1000)/1000)-g.Value()))*1000)/1000 +' \\]';}], {fixed:true, visible:true, fontSize:14}); |
textergebnis4=brd3.create('text',[7.75,1.5, function() | textergebnis4=brd3.create('text',[7.75,1.5, function() | ||
{var x = new Array(50000); | {var x = new Array(50000); | ||
for (var i = 0; i < 50001; i++) {x[i] = Math.round((a.Value()*Math.cos(2*Math.PI*b.Value()*(i/1000)-2*Math.PI*c.Value()/360)+d.Value()*Math.cos(2*Math.PI*e.Value()*(i/1000)-2*Math.PI*g.Value()/360)) *1000)/1000;}; | for (var i = 0; i < 50001; i++) {x[i] = Math.round((a.Value()*Math.cos(2*Math.PI*b.Value()*(i/1000)-2*Math.PI*c.Value()/360)+d.Value()*Math.cos(2*Math.PI*e.Value()*(i/1000)-2*Math.PI*g.Value()/360)) *1000)/1000;}; | ||
− | return '\\[x_{max}= '+ Math.max.apply(Math,x)+' \\]';}], {fixed:true, visible:true}); | + | return '\\[x_{max}= '+ Math.max.apply(Math,x)+' \\]';}], {fixed:true, visible:true, fontSize:14}); |
textergebnis5=brd3.create('text',[10.5,1.5, function() | textergebnis5=brd3.create('text',[10.5,1.5, function() | ||
− | { return '\\[T_0= '+ Math.round(getT0() *100)/100 +' \\]';}], {fixed:true, visible:true, strokeColor:'blue'}); | + | { return '\\[T_0= '+ Math.round(getT0() *100)/100 +' \\]';}], {fixed:true, visible:true, strokeColor:'blue', fontSize:14}); |
Revision as of 14:02, 13 September 2017