필터 지우기
필터 지우기

Joining all y-axis points by a smooth line

조회 수: 3 (최근 30일)
Pavan Kumar
Pavan Kumar 2019년 6월 5일
댓글: Star Strider 2019년 6월 6일
Dear Firends,
Need you suggestion.
I have the following matlab figure which have multiple y values for one x-point.
I want to join all the points by a smooth line as shown by the red.
If however, i use matlab plot or line function, it joing all the points according to increasing x-value and makes the plot noisy.
Can anyone suggest me how to join these points as shown by using matlab or any other program.
Thanking you.
123456.jpg

채택된 답변

Star Strider
Star Strider 2019년 6월 5일
Try this:
y = linspace(1.2, 3, 50);
x = sin(2*pi*y)*2000;
figure
plot(x, y, '-o')
grid
It would be easier if we had your data, since I do not know if they are sorted or random. If they are random, you would need to sort them first to use this approach.
  댓글 수: 7
Pavan Kumar
Pavan Kumar 2019년 6월 6일
As suggested, i removed th unnessary data points and got good curve.
Thanks STAR strider..:)
final.png
Star Strider
Star Strider 2019년 6월 6일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Digital Filter Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by