Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: show residuals of circle fit

  • To: mathgroup at smc.vnet.net
  • Subject: [mg79949] Re: show residuals of circle fit
  • From: Ray Koopman <koopman at sfu.ca>
  • Date: Thu, 9 Aug 2007 05:25:12 -0400 (EDT)
  • References: <f9c0vf$6cg$1@smc.vnet.net>

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