Least-squares line fitting: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 10: Line 10:
for (i=0;i<100;i++) {
for (i=0;i<100;i++) {
   xr = 10*(Math.random()-0.5);
   xr = 10*(Math.random()-0.5);
   yr = xr*0.3+delta*(Math.random()-0.5) +1.0;
   yr = 5.0*xr+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}));
}
}

Revision as of 19:28, 5 November 2010