Random walks: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 21: Line 21:
<input type="button" value="run" onClick="run()">
<input type="button" value="run" onClick="run()">
<input type="button" value="clear" onClick="clearturtle()">
<input type="button" value="clear" onClick="clearturtle()">
<input type="text" value="" id="output">
</form>
</form>
</html>
</html>
Line 43: Line 44:
     t.home();
     t.home();
   }
   }
   alert(sumdist);
   $('output').value = sumdist.toFixed(3);
   brd.unsuspendUpdate();
   brd.unsuspendUpdate();
}
}
function clearturtle() {
function clearturtle() {
  sumist = 0.0
   t.cs();
   t.cs();
}
}

Revision as of 18:26, 26 May 2009

Number of random walks:

Source code

<jsxgraph width="600" height="600">
</jsxgraph>

External links

  • []