Least-squares line fitting: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 44: Line 44:


brd.create('circle',[ [xm,ym], r]);  
brd.create('circle',[ [xm,ym], r]);  
alert([xm,ym,r].toString());
//alert([xm,ym,r].toString());
/*
/*
// Having constructed the points, we can fit a line described  
// Having constructed the points, we can fit a line described  

Revision as of 11:19, 7 November 2010

This little JXSGraph application finds the line - described by homogeneous coordinates [a,b,c] - that minimizes

[math]\displaystyle{ \sum_{i=1}^n (ax_i+by_i+cz_i)^2. }[/math]

Coming soon...