home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / programm / 2377 < prev    next >
Encoding:
Internet Message Format  |  1992-08-18  |  1018 b 

  1. Xref: sparky comp.programming:2377 comp.realtime:973
  2. Path: sparky!uunet!munnari.oz.au!yoyo.aarnet.edu.au!sirius.ucs.adelaide.edu.au!amodra
  3. From: amodra@ucs.adelaide.edu.au (Alan Modra)
  4. Newsgroups: comp.programming,comp.realtime
  5. Subject: Re: Fitting a gaussian curve to data
  6. Message-ID: <8237@sirius.ucs.adelaide.edu.au>
  7. Date: 19 Aug 92 02:44:38 GMT
  8. References: <1992Aug17.100836.15450@jet.uk>
  9. Followup-To: comp.programming
  10. Organization: Information Technology Division, The University of Adelaide, AUSTRALIA
  11. Lines: 10
  12.  
  13. From article <1992Aug17.100836.15450@jet.uk>, by rmal@jet.uk (Richard Lucock):
  14. > Hi,
  15. >       I am looking for a routine (code or algorithm) to fit a
  16. > gausian curve to data. I can do this easily using a least squares
  17. > minimisation routine (from the Nag library in fact), but it is too
  18. > slow (this is for a realtime application, hence the crossposting), so
  19. > I am trying to find something faster.
  20.  
  21. Use   mean = (x1 + x2 + .. + xn) / n
  22.       var = (x1*x1 + x2*x2 + .. + xn*xn - n*mean*mean) / (n-1)
  23.