home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / sci / math / stat / 2871 < prev    next >
Encoding:
Text File  |  1993-01-28  |  933 b   |  21 lines

  1. Newsgroups: sci.math.stat
  2. Path: sparky!uunet!stanford.edu!nntp.Stanford.EDU!clint
  3. From: clint@leland.Stanford.EDU (Clint Cummins)
  4. Subject: Re: Fit a circle to (x,y) datapoints?
  5. Message-ID: <1993Jan26.224443.25341@leland.Stanford.EDU>
  6. Sender: news@leland.Stanford.EDU (Mr News)
  7. Organization: DSG, Stanford University, CA 94305, USA
  8. References: <1993Jan26.141416.13815@galen.physiol.ox.ac.uk>
  9. Date: Tue, 26 Jan 93 22:44:43 GMT
  10. Lines: 9
  11.  
  12. You can't specify y in terms of x, because a circle is not a function
  13. (one x can map to 2 different values of y).  Instead, use a "fake" dependent
  14. variable with the value zero, and on the right hand side, write the function
  15. to be minimized (when squared).  This approach will work for any nonlinear
  16. least squares package.  In your case, let's say the circle's origin is
  17. (A,B) with radius R.  Dependent variable:  ZERO=0;
  18. Function for PROC NLIN:  ZERO = R - SQRT((X-A)**2 + (Y-B)**2)
  19.  
  20. Clint Cummins
  21.