Least-squares line fitting: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 1: Line 1:
This little JXSGraph application finds the line - described by homogeneous coordinates [a,b,1] - that minimizes
This little JXSGraph application finds the line - described by homogeneous coordinates [a,b,c] - that minimizes
:<math> \sum_{i=1}^n (ax_i+by_i+1)^2.</math>
:<math> \sum_{i=1}^n (ax_i+by_i+cz_i)^2.</math>


Coming soon...


<jsxgraph width="600" height="600">
<jsxgraph width="600" height="600">
/*
var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-5,5,5,-5], keepaspectratio:true, axis:true});
var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-5,5,5,-5], keepaspectratio:true, axis:true});
var i, p = [], angle, xr, yr, delta = 3.5;
var i, p = [], angle, xr, yr, delta = 3.5;
Line 47: Line 49:


brd.create('line',[1, z[0], z[1]]);  
brd.create('line',[1, z[0], z[1]]);  
 
*/
</jsxgraph>
</jsxgraph>



Revision as of 20:00, 5 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...