Curve start and end coordinates

Hello,
I have a curve
I want to find the starting and end coordinates of these gaussian curves.
It would be great if you guys could help!
The required data is attached in this question itself ("req_data.mat").
Thank you!

Respuestas (1)

Matt J
Matt J el 29 de Ag. de 2022
Editada: Matt J el 29 de Ag. de 2022
Gaussian curves are infinite in length., so it isn't clear what your criterion would be for where they start/stop. However, a good place to start would probably be to use the Curve Fitting Toolbox to fit a three-term Gaussian model ( 'gauss3' ).
s=load('req_data.mat').drt_data;
x=s.tau;
y=s.gamma_tau*1e4;
a=[1.5,0.5,6];
b=[-2,-0.3,1.4];
c=[1,0.5,1];
x0=[a;b;c];
ft=fit(x,y,'gauss3','StartPoint',x0(:).');
plot(ft,x,y)

5 comentarios

ekagra gupta
ekagra gupta el 29 de Ag. de 2022
Thank you for the response, I tried using first and second order derivative and later set a threshold. But the threshold is not something I can generalize for any sort of gaussian curve in my data.
How would this curve fitting help if I may ask?
ekagra gupta
ekagra gupta el 30 de Ag. de 2022
I have mentioned start and stop points, I hope its clear now, I just want to analyze individual curves and that is why I want start and stop points for my curve
Matt J
Matt J el 30 de Ag. de 2022
How would this curve fitting help if I may ask?
You seem to be saying that the lobes in your curve are Gaussians. Because Gaussians are inifinite in length, your criterion for deciding where it starts and stop points as not a priori obvious. Technically speaking, they all start and stop at +/- infinity.
Perhaps, though, you wish to use 3 standard deviations as a measure of each lobe's width. If so, the curve fit determines the standard deviations of each Gaussian for you.
ekagra gupta
ekagra gupta el 30 de Ag. de 2022
Thank you for clarifying!
Is it possible to calculate area of the 3 curves individually? (note: I still do not know the bounds for integral)
Image Analyst
Image Analyst el 30 de Ag. de 2022
Editada: Image Analyst el 30 de Ag. de 2022
The area in the tails is probably insignificant, therefore simply use the formula for the area of a Gaussian:
The area under a Gaussian curve equals Amplitude * StdDev / 0.3989
From Matt's code you know the 3 amplitudes and 3 standard deviations. It should be accurate enough for your purposes.

Iniciar sesión para comentar.

Categorías

Más información sobre Get Started with Curve Fitting Toolbox en Centro de ayuda y File Exchange.

Preguntada:

el 29 de Ag. de 2022

Editada:

el 30 de Ag. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by