Fit 1D and 2D gaussian to noisy data

Example routines for fitting 1D & 2D Gaussian curves to noisy data.

You are now following this Submission

Two example scripts are presented. The first program generates a 1D Gaussian from noisy data by two different strategies. First, using a semi-analytical method and secondly by using Matlab's "lsqcurvefit" function. Both results can be compared. The second program attempts to generate a 2D Gaussian from noisy data. This script is a re-formulation of the original idea by G. Nootz as the code is now more transparent and shorter.

Cite As

Manuel A. Diaz (2026). Fit 1D and 2D gaussian to noisy data (https://www.mathworks.com/matlabcentral/fileexchange/55033-fit-1d-and-2d-gaussian-to-noisy-data), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired by: gaussian curve fit, Fit 2D gaussian function to data

Inspired: gaussfitn

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0