Difference between revisions of "Power functions"
From JSXGraph Wiki
Jump to navigationJump to searchA WASSERMANN (talk | contribs) |
A WASSERMANN (talk | contribs) |
||
Line 1: | Line 1: | ||
− | < | + | <jsxgraph width="600" height="400" box="jxgbox"> |
− | + | b = JXG.JSXGraph.initBoard('jxgbox', {axis:true, originX: 300, originY: 200, unitX: 20, unitY: 20}); | |
− | |||
− | |||
− | |||
− | b = JXG.JSXGraph.initBoard('jxgbox', {originX: 300, originY: 200, unitX: 20, unitY: 20}); | ||
b.suspendUpdate(); | b.suspendUpdate(); | ||
− | + | var n = b.create('slider',[[-5,-2],[5,-2],[-5,1,5]],{name:'n'}); | |
− | + | var m = b.create('slider',[[1,-4],[10,-4],[1,1,10]],{name:'m'}); | |
− | + | b.create('functiongraph', [function(t){ return b.pow(t,n.Value()/m.Value()); }],{strokeColor:'#ff0000'}); | |
− | var n = b. | + | b.create('text',[-5, 3, function(){ return 'y=x<sup>'+b.round(n.Value()/m.Value(),3)+'</sup>';}]); |
− | var m = b. | ||
− | b. | ||
− | b. | ||
b.unsuspendUpdate(); | b.unsuspendUpdate(); | ||
− | </ | + | </jsxgraph> |
</html> | </html> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
<source lang="javascript"> | <source lang="javascript"> | ||
− | b = JXG.JSXGraph.initBoard('jxgbox', {originX: 300, originY: 200, unitX: 20, unitY: 20}); | + | b = JXG.JSXGraph.initBoard('jxgbox', {axis:true, originX: 300, originY: 200, unitX: 20, unitY: 20}); |
− | b. | + | b.suspendUpdate(); |
− | + | var n = b.create('slider',[[-5,-2],[5,-2],[-5,1,5]],{name:'n'}); | |
− | var n = b. | + | var m = b.create('slider',[[1,-4],[10,-4],[1,1,10]],{name:'m'}); |
− | var m = b. | + | b.create('functiongraph', [function(t){ return b.pow(t,n.Value()/m.Value()); }],{strokeColor:'#ff0000'}); |
− | b. | + | b.create('text',[-5, 3, function(){ return 'y=x<sup>'+b.round(n.Value()/m.Value(),3)+'</sup>';}]); |
− | b. | + | b.unsuspendUpdate(); |
</source> | </source> | ||
[[Category:Examples]] | [[Category:Examples]] | ||
[[Category:Calculus]] | [[Category:Calculus]] |
Revision as of 12:21, 25 March 2011
</html>
b = JXG.JSXGraph.initBoard('jxgbox', {axis:true, originX: 300, originY: 200, unitX: 20, unitY: 20});
b.suspendUpdate();
var n = b.create('slider',[[-5,-2],[5,-2],[-5,1,5]],{name:'n'});
var m = b.create('slider',[[1,-4],[10,-4],[1,1,10]],{name:'m'});
b.create('functiongraph', [function(t){ return b.pow(t,n.Value()/m.Value()); }],{strokeColor:'#ff0000'});
b.create('text',[-5, 3, function(){ return 'y=x<sup>'+b.round(n.Value()/m.Value(),3)+'</sup>';}]);
b.unsuspendUpdate();