help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gaussian fit of a peak


From: Andrea Cimatoribus
Subject: Re: Gaussian fit of a peak
Date: Tue, 23 Sep 2008 10:38:17 +0200

I am not sure I understood. Does Octave optimisation package have some
function for fitting a gaussian, or some user defined function?

2008/9/18 Ben Abbott <address@hidden>:
>
> On Sep 17, 2008, at 4:58 PM, Andrea Cimatoribus wrote:
>
>> In matlab, I used function "fit". Data are intensity as a function of
>> energy. Of course, you can think it as an histogram of event number as
>> a function of energy.
>> Andrea
>>
>> 2008/9/17 Ben Abbott <address@hidden>:
>>>
>>>
>>> On Wednesday, September 17, 2008, at 10:20AM, "Andrea Cimatoribus"
>>> <address@hidden> 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
>>>
>>> How did you do it in Matlab?
>>>
>>> If the data is statistical, then I'd recommend you calculate the median
>>> and standard deviation and construct the gaussian distribution from that.
>>>
>>> By "sums data with a peak structure" do you mean you are constructing a
>>> histogram?
>>>
>
> "fit" is part of the curefit toolbox, correct?
>
> In any event, there is a package available from MathWorks File Exchange
> called "fit" I thought would work, but Octave's fminsearch has some trouble
> with it. If you'd like to track down the specifics ...
>
>
>  http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=8468
>
> You'll need Octave's optimization package
>
>        http://octave.sourceforge.net/doc/optimization.html
>
> Ben
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]