Fit 2D gaussian function to data
The program generates a 2D Gaussian. The program then attempts to fit the data using the MatLab function “lsqcurvefit “ to find the position, orientation and width of the two-dimensional Gaussian.
Execute “mainD2GaussFitRot.m” with not input parameters.
The two-dimensional Gaussian function is defined by the function “D2GaussFunctionRot.m” and “D2GaussFunction.m”
Cite As
Gero Nootz (2026). Fit 2D gaussian function to data (https://nl.mathworks.com/matlabcentral/fileexchange/37087-fit-2d-gaussian-function-to-data), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- Image Processing and Computer Vision > Computer Vision Toolbox > Recognition, Object Detection, and Semantic Segmentation > Semantic Segmentation >
Tags
Acknowledgements
Inspired: gaussfitn, Calibration of Single Crystal Electron Diffraction Patterns, Fit 1D and 2D gaussian to noisy data
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
