You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
fits n number of lorentizian peaks to xy data with automated peak detection (tweak minpeakheight and minpeakwidth for better detection)
see also https://www.mathworks.com/matlabcentral/fileexchange/63771-fitngaussian-xy--parameters-
how to use:
1. Download fitnlorentzian.m plus example data in 4peaksdata.dat (https://github.com/ebauch/matlab/blob/master/4peaksdata.dat)
2. In matlab run
% import xy data
xydata = load('4peaksdata.dat');
% fit data with n = 1,...,4 peaks
n = 3;
fitnlorentzian(xydata, n)
code is maintained at
Cite As
Erik (2026). fitnlorentzian(xydata, parameters) (https://se.mathworks.com/matlabcentral/fileexchange/63748-fitnlorentzian-xydata-parameters), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.3.0.0 (4.03 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
