How to fit a lorentzian function to this raw data?

37 ビュー (過去 30 日間)
Rachel Dawn
Rachel Dawn 2019 年 2 月 5 日
編集済み: Bjorn Gustavsson 2020 年 6 月 3 日
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
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 件のコメント
BURCU OZDEN
BURCU OZDEN 2020 年 6 月 3 日
A=load('name of the file where your data is.txt');
>> x=A(:,1);
>> y=A(:,2);
Bjorn Gustavsson
Bjorn Gustavsson 2020 年 6 月 3 日
編集済み: Bjorn Gustavsson 2020 年 6 月 3 日
You'll find information about the Lorenz-profile here:

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by