フィルターのクリア

Basic fitting MATLAB: Fitting the data with approximate curve.

15 ビュー (過去 30 日間)
Yogesh Badhe
Yogesh Badhe 2015 年 9 月 21 日
回答済み: Yogesh Badhe 2015 年 9 月 28 日
I have plotted X-Y data using MATLAB (image on left in fig.), I have total 19300 data points which I got from experiments. I have used tools like "spline interpolant", "shape-preserving interpolat" etc to do basic fitting, but it does not satisfy my requirement. What I want is smooth curve which should look like red curve shown in figure (right fig.). Further, I also want to get information out of red curve, for example slope of the curve at various points on red curve. Can you please suggest me an appropriate tool for these two purposes. Thank you.

採用された回答

Yogesh Badhe
Yogesh Badhe 2015 年 9 月 28 日
Use "curve fitting" app, upload the data points and use smoothing curve option.

その他の回答 (1 件)

Chandramouli Gnanasambandham
Chandramouli Gnanasambandham 2015 年 9 月 22 日
Use the MATLAB built in function filter. vary the parameter window size to get better smoothness.
windowSize = 70;
b = (1/windowSize)*ones(1,windowSize);
a= 1;
out = filter(b,a,ydata);
plot(xdata,ydata,'.')
hold on
grid on
plot(xdata,out,'r','LineWidth',2);
hold off
hope this helps :)
  1 件のコメント
Chandramouli Gnanasambandham
Chandramouli Gnanasambandham 2015 年 9 月 22 日
for the slope calculation at every data point try using the 'diff' command

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

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by