Article View: sci.math.stat
Article #863Re: Fit a circle to (x,y) datapoints?
From: Clint Cummins
Date: Tue, 26 Jan 1993 22:44
Date: Tue, 26 Jan 1993 22:44
9 lines
953 bytes
953 bytes
You can't specify y in terms of x, because a circle is not a function (one x can map to 2 different values of y). Instead, use a "fake" dependent variable with the value zero, and on the right hand side, write the function to be minimized (when squared). This approach will work for any nonlinear least squares package. In your case, let's say the circle's origin is (A,B) with radius R. Dependent variable: ZERO=0; Function for PROC NLIN: ZERO = R - SQRT((X-A)**2 + (Y-B)**2) Clint Cummins
Technical Details
Message-ID:
<1993Jan26.224443.25341@leland.Stanford.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!nntp.Stanford.EDU!clintReferences:
<1993Jan26.141416.13815@galen.physiol.ox.ac.uk>Show Full Headers
Complete Article Headers
Newsgroups: sci.math.stat Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!nntp.Stanford.EDU!clint From: clint@leland.Stanford.EDU (Clint Cummins) Subject: Re: Fit a circle to (x,y) datapoints? Message-ID: <1993Jan26.224443.25341@leland.Stanford.EDU> Sender: news@leland.Stanford.EDU (Mr News) Organization: DSG, Stanford University, CA 94305, USA References: <1993Jan26.141416.13815@galen.physiol.ox.ac.uk> Date: Tue, 26 Jan 93 22:44:43 GMT Lines: 9