home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: sci.math.stat
- Path: 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
-
- 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
-