Least-squares circle fitting: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 25: | Line 25: | ||
c = JXG.Math.matVecMult(MT, y); | c = JXG.Math.matVecMult(MT, y); | ||
coeffs = JXG.Math.Numerics.Gauss(B, c); | coeffs = JXG.Math.Numerics.Gauss(B, c); | ||
var xm = coeffs[0]*0.5; | |||
var ym = coeffs[1]*0.5; | |||
var r = Math.sqrt(coeffs[2]+xm*xm+ym*ym); | |||
brd.create('circle',[ [xm,ym], r]); | |||