voigt line shape fit

version (184 KB) by Mahmut Ruzi
This function fits spectral data to voigt profile


Updated 7 Jun 2020

View License

This code is provided as it is, there might be errors,may not work sometimes, so use it with your discretion. If encounter any problem, please first read the description below, and then the two references.

[parmin,resnom,res,exitflag]= fit2voigt(dat,par0)
This code do the following: if you supply a two column spectral data ( first column is wavenumber, second column is absorbance) dat, and initial peak parameters par0, it gives you optimised voigt line shape parameters parmin, and the fit and fitting quality information.
It uses the the Voigt/complex error function (File ID: #47801) of Sanjar Abrarov. You need to download the code, and put under the same folder as these files.
Analytical jacobians is included.
Also included is the test data. you can test by running the voigtfit_test m.file

R.J. Wells, Rapid approximation to the Voigt/Faddeeva function and its derivatives, JQSRT 62(1999), 29-48
S. M. Abrarov and B. M. Quine, Appl. Math. Comput., 218 (2011) 1894-1902

Cite As

Mahmut Ruzi (2022). voigt line shape fit (https://www.mathworks.com/matlabcentral/fileexchange/57603-voigt-line-shape-fit), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2017a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!