Fits 1D or 2D equidistantly spaced data to the 0th order Gaussian beam and returns the HWHM (half-width half-maximum) estimation in pixels.
Even though the fitting is performed by Matlab's own 'fit' function, the secret to a reasonable fit is a proper input of initial parameters. This is where the 'smart' part happens. It provides a reasonable estimation of the amplitude, noise floor, beam center coordinates and width based on the statistical distribution of data, not by merely taking maximum or minimum points etc. This makes the fitting faster and less ambiguous, especially in noisy data.
Cite As
Kristupas Tikuišis (2024). fitgaussbeam (https://www.mathworks.com/matlabcentral/fileexchange/113230-fitgaussbeam), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2022a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.