how to fit a a curve using gamma fit
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/224958/Schermafbeelding%202019-06-17%20om%2021.09.04.png)
![Schermafbeelding 2019-06-17 om 21.09.04.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/224958/Schermafbeelding%202019-06-17%20om%2021.09.04.png)
0 comentarios
Respuestas (1)
dpb
el 18 de Jun. de 2019
See
doc gamfit
but all the inflection points in the green curve have no chance to be reflected in a fitted function.
2 comentarios
dpb
el 19 de Jun. de 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
el 19 de Jun. de 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?
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!