Levenberg–Marquardt algorithm - Lorentz function with area

Version 1.0.1 (2.51 KB) by Karol Vegso
I post here Levenberg–Marquardt algorithm for fitting Lorentz function with the area.
59 Downloads
Updated 4 Feb 2022

View License

The Lorezntz function is widely used for fitting Raman peaks in Raman spectroscopy. Thus, it is important function in various disciplines of science such as optics and X-ray characterization of materials. Therefore, it is necessary to know and understand non-linear least squares methods for fitting Lorentz functions. Here, I present simple Levenberg–Marquardt algorithm for fitting Lorentz function with area. The fitting parameters are area, center, width and offset. The general Levenberg–Marquardt algorithm was taken from on-line available pdf document "METHODS FOR NON-LINEAR LEAST SQUARES PROBLEMS" written by K. Madsen, H.B. Nielsen, O. Tingleff from Technical University of Denmark.
There are situations in life when optimization toolboxes are too expensive or it is necessary to perform low-level programming in Matlab or C++. Then it is important to understand principles of fitting algorithms. By use of C++ Eigen library, you can transfer algorithm posted here to C++. Enjoy the algorithm.

Cite As

Karol Vegso (2024). Levenberg–Marquardt algorithm - Lorentz function with area (https://www.mathworks.com/matlabcentral/fileexchange/106195-levenberg-marquardt-algorithm-lorentz-function-with-area), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2021b
Compatible with R2018a to R2021b
Platform Compatibility
Windows macOS Linux

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.1

The clarity of notes was improved.

1.0.0