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