MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: show residuals of circle fit


This plots the radial residuals as a function of the angle.

SeedRandom[1]; points = Table[theta = Random[];
  {2*Cos[theta] + 1 + .05*Random[],
   2*Sin[theta] - 3 + .05*Random[]}, {30}];

{rad, cen} = hypersphereFit[points]

{2.05827,{0.96721,-2.98603}}

ListPlot[points, PlotRange->All, AspectRatio->Automatic, Axes->None,
         Prolog->{Circle[cen,rad,{0,1}], PointSize[.02]}];

ListPlot[{ArcTan@@(#-cen),Norm[#-cen]-rad}& /@ points,
         PlotRange->All, Prolog->PointSize[.015]];



  • Prev by Date: Lattice operations
  • Next by Date: Re: why DateListPlot is so slow?
  • Previous by thread: Re: show residuals of circle fit
  • Next by thread: Re: show residuals of circle fit