how can I plot smooth graph

6 ビュー (過去 30 日間)
Md Mostofa Haider
Md Mostofa Haider 2019 年 3 月 14 日
コメント済み: Md Mostofa Haider 2019 年 3 月 17 日
I do have much noise in the data from a test. So my graph doesn't look good. y axis data are consistent however x axis data have fluctuation. How can I smooth the graph like the black graph in the picture keeping the maximum value of y in matlab?
Test.jpg
  1 件のコメント
Raghunandan V
Raghunandan V 2019 年 3 月 14 日
I think there is a seperate tool; box for this purpose(Curve Fitting Toolbox). Check it out.

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

回答 (1 件)

Arvind Sathyanarayanan
Arvind Sathyanarayanan 2019 年 3 月 14 日
A moving average filter might do the job. Play around with the number of points to preserve the peak value.
N = 10;
h = (1/N)*ones(1,N);
filtered = conv(orginal, h);
filtered = filtered(N:end);
  1 件のコメント
Md Mostofa Haider
Md Mostofa Haider 2019 年 3 月 17 日
Thanks. It worked for me.

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

カテゴリ

Help Center および File ExchangeGraph and Network Algorithms についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by