Power functions

From JSXGraph Wiki
Revision as of 11:54, 8 June 2011 by Michael (talk | contribs)

</html>

b = JXG.JSXGraph.initBoard('jxgbox', {axis:true, boundingbox: [-15, 10, 15, -10]});
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();