Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #1246 > unrolled thread

Re: Fit Gaussian function to histogram

Started byRichard Hofler <rhofler@bus.ucf.edu>
First post2011-03-30 09:08 +0000
Last post2011-03-30 09:08 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: Fit Gaussian function to histogram Richard Hofler <rhofler@bus.ucf.edu> - 2011-03-30 09:08 +0000

#1246 — Re: Fit Gaussian function to histogram

FromRichard Hofler <rhofler@bus.ucf.edu>
Date2011-03-30 09:08 +0000
SubjectRe: Fit Gaussian function to histogram
Message-ID<imurun$hrp$1@smc.vnet.net>
Hello,

Try this:

data=Table[Random[NormalDistribution[10,2]],{10000}];
histo=Histogram[data];
plt=Plot[2000 PDF[NormalDistribution[10,2]][x],{x,4,16}];
Show[histo,plt]

Richard


-----Original Message-----
From: cubsfan334 [mailto:cubsfan334@gmail.com]
Sent: Tuesday, March 29, 2011 7:55 AM
Subject:  Fit Gaussian function to histogram

Hi,

I realize that I can generate a histogram from a data set using the
Histogram[{data},bin size] command, yet this only seems to create a
graphic.  Is there anyway to fit a function (preferably Gaussian) to
the histogram Mathematica creates?

Thanks!

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web