fitting data to gaussian given centroid

5 次查看(过去 30 天)
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
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