how can I plot smooth graph

5 次查看(过去 30 天)
Md Mostofa Haider
Md Mostofa Haider 2019-3-14
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
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);

类别

Help CenterFile Exchange 中查找有关 Graph and Network Algorithms 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by