how to fit a a curve using gamma fit

13 Ansichten (letzte 30 Tage)
Jos Huigen
Jos Huigen am 17 Jun. 2019
Kommentiert: dpb am 19 Jun. 2019
I am trying to fit a function using the gamma fit, but I think that my knowledge of the concept is too limited. Right now, I have 4 plotted lines, made up out of the same time vector for each x and 4 different signal intensity vectors for each y, but the curves should be fitted to extract the wanted information optimally. I expected to find a command that would take both my time vector and my intensity vector and create a gamma function that would approximate my curve, but I could not find such a command. Does anyone understand what I mean and if so, which commands should I use to fit the curve? Below I have added a figure with the 4 plotted lines, each of them was already resampled using the pchip command, hence the smooth line alongside the dashed line, which had the original samples. The gamma function would be made out of the time vector and the signal intensity vector that I made using the pchip command. Thanks in advance for any help you could give me!Schermafbeelding 2019-06-17 om 21.09.04.png

Antworten (1)

dpb
dpb am 18 Jun. 2019
See
doc gamfit
but all the inflection points in the green curve have no chance to be reflected in a fitted function.
  2 Kommentare
dpb
dpb am 19 Jun. 2019
[Jos H Answer moved to comment --dpb]
But that function doesn't give any possibility to do curve fitting, does it? If it does, I don't understand how to use it. If it doesn't, could you please tell me what function I have to use and how?
Just to be clear: I won't be using the dashed lines. The dashed lines are the original curves and the solid ones are made using the pchip command. For curve fitting we would use just the solid lines. It it possible for these lines to do that? If not, why?
dpb
dpb am 19 Jun. 2019
Well, perhaps the definition of what you mean by "curve fitting" and "gamma fit" are the issue--but gamfit will calculate the two parameters of a gamma distributed pdf by MLE that best will fit the observed observations presuming they came from a gamma-distributed variable. There isn't any concept of time available in such a model, however.
As far as the shape, the gamma distribution is single-moded...and, the intensity values would have to be considered samples from a single distribution.
That doesn't seem to be what your data represent (altho I don't really have any clue as to what that might be) so perhaps the description of the desired fitting process is misleading down the wrong direction.
Can you show some reference paper in the field that illustrates what you're trying to accomplish, perhaps?

Melden Sie sich an, um zu kommentieren.

Produkte


Version

R2016a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by