how can I plot smooth graph

조회 수: 1 (최근 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 CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by