lorentzian fit
Version 1.0.0.0 (2.08 KB) by
Yohanan Sivan
In the attached file example i use "nlinfit", which can fit any kind of function that you want. the
On the gaussian fit i used "polyfit" which gives you en absolut one solution, but have some problems fitting non-linear model.
In the attached file example i use "nlinfit", which can fit any kind of function that you want. the problem is that you need to give here a starting point.
"main.m" include the example code to use nlinfit.
"data.txt" is data (x,y) that needed to be fitted.
"fun.m" is the function to be fitted, in you case it's lorentzian.
Cite As
Yohanan Sivan (2026). lorentzian fit (https://uk.mathworks.com/matlabcentral/fileexchange/13648-lorentzian-fit), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R14
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Linear Algebra in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |