Least-squares line fitting: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 9: | Line 9: | ||
brd.suspendUpdate(); | brd.suspendUpdate(); | ||
for (i=0;i<100;i++) { | for (i=0;i<100;i++) { | ||
yr = 10*(Math.random()-0.5); | |||
xr = 0*yr+delta*(Math.random()-0.5) +1.0; | |||
p.push(brd.create('point',[xr, yr], {withLabel:false})); | p.push(brd.create('point',[xr, yr], {withLabel:false})); | ||
} | } |