Hello all,
I have raw data (column B) and fit data (column A). I am wondering what fit was it?. Can anyone please have a look at the data and fit (graph) and clarify my doubt?. How do I perform it in MatLab?. Kindly help.

3 件のコメント

jonas
jonas 2018 年 8 月 3 日
編集済み: jonas 2018 年 8 月 3 日
Looks more like a moving average filter than a fitted equation. Are you sure it's a fit?
A moving average filter goes over your data point-by-point and calculates an average within a range (window) from that point. See for example the MATLAB function smooth . Your fit does not look parametric in nature as it retains the noise (although damped out). More likely some type of filter.
Devan Krishnamurthy
Devan Krishnamurthy 2018 年 8 月 3 日
Thank you Jonas. I will look into it.
jonas
jonas 2018 年 8 月 3 日
No problem, I've put the comment in the answers section so that the question is flagged as answered. As stated, if you provide some data I could try to identify the method used (granted that it's one of the standard ones).

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

 採用された回答

jonas
jonas 2018 年 8 月 3 日
編集済み: jonas 2018 年 8 月 3 日

0 投票

Looks more like a smoothing filter than a fitted equation. Perhaps a moving average.
A moving average filter goes over your data point-by-point and calculates an average within a range (window) from that point. See for example the MATLAB functions movmean and smooth . Your fit does not look parametric in nature as it retains the noise (although damped out). More likely some type of filter.
Try smoothing your data with different methods, using the smooth function, and see if you can reproduce the results. If you provide data, I'd be willing to help.

7 件のコメント

Devan Krishnamurthy
Devan Krishnamurthy 2018 年 8 月 3 日
Thank you Jonas, I would really appreciate it. Kindly find the attached sample data ( new revised) in excel spreadsheet format that I am trying to figure out. "Sheet 1" has all data. Kindly have a look at it and let me know. Thanks for your help.
jonas
jonas 2018 年 8 月 3 日
Cannot quite figure it out. Is there some background that one should be aware of? Context? There is a lot of other data in that file that we are not using.
Devan Krishnamurthy
Devan Krishnamurthy 2018 年 8 月 7 日
編集済み: Devan Krishnamurthy 2018 年 8 月 7 日
Thank you Jonas for looking at it. Okay I will make it simple now. I have attached a new and simple sample data now. Please find the attached data. Can you please let me know how to perform moving average and also Lorentz fit?. I really appreciate your help.
jonas
jonas 2018 年 8 月 7 日
編集済み: jonas 2018 年 8 月 7 日
That's easier. You're going to need this function from fileexchange for the Lorentzian fit ( link ).
%%Import data
data=xlsread('Sample Data_MatLab.xls');
x=data(:,1);
y=data(:,2);
y=y(~isnan(x));
x=x(~isnan(x));
%%Moving average
w=100; %window
ym=smooth(y,w,'moving')
%%Lorentz
yl=lorentzfit(x,y)
figure;
h=plot(x,y,'-b',...
x,ym,'-r',...
x,yl,'-k')
h=legend(h,'data','moving average','Lorentz fit')
Devan Krishnamurthy
Devan Krishnamurthy 2018 年 8 月 7 日
Thanks a bunch. This really helped.
Devan Krishnamurthy
Devan Krishnamurthy 2018 年 8 月 7 日
One more help, can you please help me to calculate FWHM of the fit data?.
jonas
jonas 2018 年 8 月 7 日
編集済み: jonas 2018 年 8 月 7 日
Full width of half max? I dont know what that means in this context.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGet Started with Curve Fitting Toolbox についてさらに検索

タグ

質問済み:

2018 年 8 月 3 日

編集済み:

2018 年 8 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by