Draggable exponential function: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 5: Line 5:
var graph = board.create('functiongraph', [
var graph = board.create('functiongraph', [
         function(x) {
         function(x) {
             var a = Math.log(p.Y() - p.X());
             var a = Math.log(p.Y()) / p.X();
             return Math.exp(a * x);
             return Math.exp(a * x);
         }]);
         }]);
            
            
var txt = board.create('text', [-2, 5, function () {
var txt = board.create('text', [-2, 5, function () {
           return "a = " + (Math.log(p.Y() - p.X())).toFixed(2);
           return "a = " + (Math.log(p.Y()) / p.X()).toFixed(2);
           }]);
           }]);
</jsxgraph>
</jsxgraph>

Revision as of 09:29, 16 February 2016