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 8: | Line 8: | ||
// points from the line.  | // points from the line.  | ||
brd.suspendUpdate();  | brd.suspendUpdate();  | ||
for (i=0;i<  | for (i=0;i<3;i++) {  | ||
   xr = 10*(Math.random()-0.5);  |    xr = 10*(Math.random()-0.5);  | ||
   yr = 0.3*xr+delta*(Math.random()-0.5) +1.0;  |    yr = 0.3*xr+delta*(Math.random()-0.5) +1.0;  | ||