How to fit a lorentzian function to this raw data?
39 次查看(过去 30 天)
显示 更早的评论
My research mentor asked if I could help him curve fit the Lorentzian to some raw data.
Disclaimers: 1) I have no experience with curve fitting. 2) I have no idea what the Lorentzian function is.
My raw data is a matrix of x and y values. When you plot these values, you get a concave down parabola (which is good I guess because that's how the Lorentzian looks). I want to fit the Lorentzian and have it spit out 1 value: the width parameter
So, I found this function/script online: https://www.mathworks.com/matlabcentral/fileexchange/33775-lorentzfit-x-y-varargin
I could copy and paste this into Matlab, good starting point? After this, though, how do I actually input my x and y values into the function? Because the function is LORENZFIT(X,Y). Is X an x-value matrix and Y a y-value matrix?
Thanks so much! Sorry for my complete ignorance on the subject. I tried watching some youtube videos on the Lorentzian function but those really just shed light on the theory behind the function.
2 个评论
Bjorn Gustavsson
2020-6-3
编辑:Bjorn Gustavsson
2020-6-3
You'll find information about the Lorenz-profile here:
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!