Fit data to Gaussian distribution
The least-squares fitting is probably what your are looking for as this is maximum likelihood estimator for data points with Gaussian distribution around best fit curve.

There is already a built-in function lsqcurvefit in MATLAB:

I wrote a tutorial article on both linear and non-linear least squares methods (Gauss-Newton, Levenberg-Marquardt) if you need some deeper understanding of the topic:

Linear and Nonlinear Least-Squares with Math.NET



Please note you are asking how to use some actual piece of software (i.e. MATLAB) while this site is more about principles and practices. You can find hints for MATLAB on other forum (e.g. StackOverflow).