Differential equations: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 21: Line 21:


function ode() {
function ode() {
   return JXG.Math.Numerics.rungeKutta(JXG.Math.Numerics.predefinedButcher.Heun, [P.Y()], [0, 10], 100, f);
   return JXG.Math.Numerics.rungeKutta(JXG.Math.Numerics.predefinedButcher.Heun, [P.Y()], [0, 10], 500, f);
}
}


Line 27: Line 27:
g.updateDataArray = function() {
g.updateDataArray = function() {
     var data = ode();
     var data = ode();
     var h = 0.1;
     var h = 0.02;
     this.dataX = [];
     this.dataX = [];
     this.dataY = [];
     this.dataY = [];

Revision as of 09:40, 14 July 2010

f(t,x)=

The underlying JavaScript code