Random walks: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) 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"> | <br /> | ||
Average square length of the walks:<input type="text" value="" id="output"> | |||
</form> | </form> | ||
</html> | </html> | ||
Line 44: | Line 45: | ||
t.home(); | t.home(); | ||
} | } | ||
$('output').value = sumdist.toFixed(3); | $('output').value = (sumdist/nr).toFixed(3); | ||
brd.unsuspendUpdate(); | brd.unsuspendUpdate(); | ||
} | } |
Revision as of 18:27, 26 May 2009
Source code
<jsxgraph width="600" height="600">
</jsxgraph>
External links
- []