fitting data to gaussian given centroid

조회 수: 3 (최근 30일)
Mohammed Alaidaroos
Mohammed Alaidaroos 2019년 7월 2일
댓글: Mohammed Alaidaroos 2019년 7월 21일
I only have data points for half of the curve and I want to fit this data points to a gaussian disterbution.
Can I fit this data points given that I know the centroid of the gaussian desterbution? is there a function where I can fit to a gaussian disterbution and specify the centroid?

답변 (1개)

Abhisek Pradhan
Abhisek Pradhan 2019년 7월 17일
Hi,
Curve Fitting app can be used to fit curves and surfaces interactively. Even tough half data sets are not present Curve Fitting App will extrapolate the values.
Refer Gaussian Modelsfor detailed implementation.
Incase you data is sparse another approach will be to get the mean and variance using normfit and plot the curve using normpdf.
% for x dataset.
[mean,var] = normfit(x);
y = normpdf(x,mean,var);
plot(x,y,'.');
  댓글 수: 1
Mohammed Alaidaroos
Mohammed Alaidaroos 2019년 7월 21일
I tried curve fitting app but still the curve is not how I want it to look
I believe because I does not know that these data points are only for half the curve, it try to fit them to a bigger gaussian.
you can see in the photo attached the different fits I obtained. the curve with the cruser in it is how I want the curve to look like. I can't use that one because its only based on the maximum three points (y wise).
also, I attached x and y values in variables. Note: first element is part of the left half of the curve because it starts decreasing.fits.png

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Fit Postprocessing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by