Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #1330
| From | "Kevin J. McCann" <Kevin.McCann@umbc.edu> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Fit Gaussian function to histogram |
| Date | 2011-03-31 09:02 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <in1fv4$4j4$1@smc.vnet.net> (permalink) |
| References | <imsh9i$5me$1@smc.vnet.net> |
Histogram gives the plot, but if you want the actual bin counts, use
BinCounts. The mma help will give you the options to call it; I usually use
BinCounts[data,dx] in which dx is the bin width. You can also specify
all the bins with BinCounts[data,{xmin,xmax,dx}]. It is then easy to
convert the counts to probability densities.
Kevin
On 3/29/2011 7:54 AM, cubsfan334 wrote:
> 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!
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Fit Gaussian function to histogram "Kevin J. McCann" <Kevin.McCann@umbc.edu> - 2011-03-31 09:02 +0000
csiph-web