[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Gaussian fit of a peak
From: |
Rob Mahurin |
Subject: |
Re: Gaussian fit of a peak |
Date: |
Tue, 23 Sep 2008 17:56:01 -0400 |
Hi,
Over the summer I wrote some code that finds derivatives for fitting
exponential and gaussian distributed data with leasqr. I have just
stuck this up on the web at
http://sns.phys.utk.edu/~mahurin/octave/
So Andrea, if your [x,y] data look like they have a peak at x=0, y=1
and a width of about 2, you could say
[f, p] = multigaus_fit(x,y,[1 0 2]);
and p will contain a best-fit [mean, amplitude, width]. You can get
other diagnostics from the leasqr fit, too.
I'm willing to contribute these scripts to octave-forge, if that's
appropriate.
Cheers,
Rob
On Sep 17, 2008, at 10:20 AM, Andrea Cimatoribus wrote:
Hi everybody,
I am an absolute novice of octave, even though I have some experience
with matlab.
Just to get the feeling of octave, I am presently translating a simple
(but very useful to me) script, that basically sums data with a peak
structure. In order to do this properly, I need to centre each new
spectrum on the zero, that is the peak maximum. My strategy, in
matlab, was to make a preliminary gaussian fit, whose result was to be
confirmed through a graphical input, to get the "zero" of the
spectrum. As of now, I am trying to understand how can I make a
gaussian fit of the data in octave. Data is simply organised as a
matrix [x,y]. Is there a built function? Sorry but I can't find
anything with online help.
Andrea
_______________________________________________
Help-octave mailing list
address@hidden
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
--
Rob Mahurin
Dept. of Physics & Astronomy
University of Tennessee phone: 865 207 2594
Knoxville, TN 37996 email: address@hidden
- Re: Gaussian fit of a peak, (continued)
- Re: Gaussian fit of a peak, Andrea Cimatoribus, 2008/09/23
- Re: Gaussian fit of a peak, Ben Abbott, 2008/09/23
- Re: Gaussian fit of a peak, Andrea Cimatoribus, 2008/09/23
- Re: Gaussian fit of a peak, Thomas Weber, 2008/09/23
- Re: Gaussian fit of a peak, Andrea Cimatoribus, 2008/09/23
- Message not available
- Message not available
- Fwd: Gaussian fit of a peak, Andrea Cimatoribus, 2008/09/24
- Re: Gaussian fit of a peak, Carlo de Falco, 2008/09/24
- Re: Gaussian fit of a peak, Andrea Cimatoribus, 2008/09/24
- Re: Fwd: Gaussian fit of a peak, Francesco Potorti`, 2008/09/24
- Re: Fwd: Gaussian fit of a peak, LUK ShunTim, 2008/09/24
Re: Gaussian fit of a peak,
Rob Mahurin <=
Re: Gaussian fit of a peak, Julius Smith, 2008/09/23