Fit 1D and 2D gaussian to noisy data

Example routines for fitting 1D & 2D Gaussian curves to noisy data.
1.4K Downloads
Updated 22 Jan 2016

View License

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 (2024). 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 .

MATLAB Release Compatibility
Created with R2013b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Linear and Nonlinear Regression in Help Center and MATLAB Answers
Acknowledgements

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

Inspired: gaussfitn

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0