필터 지우기
필터 지우기

How can I discretize a smooth curve?

조회 수: 7 (최근 30일)
Tay
Tay 2020년 5월 7일
댓글: Stephen23 2021년 11월 24일
If I have a smooth curve and I want to discretize this curve in some steps how can I do it? I saw some funtion in matlab but is does not work in my curve. See the image below.
  댓글 수: 9
Lazaros Christoforidis
Lazaros Christoforidis 2020년 5월 7일
np, you could rescale your x, y values

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

채택된 답변

Cris LaPierre
Cris LaPierre 2020년 5월 7일
Try using the discretize function
y=linspace(3.5,3.4965);
x=linspace(0,1000);
plot(x,y)
% discretize
[Y,E] = discretize(y,20);
hold on
plot(x,E(Y),'--r')
hold off
Also, consider looking into the stairstep graph, though that seems to put the steps outside the curve again.
  댓글 수: 5
Lazaros Christoforidis
Lazaros Christoforidis 2020년 5월 7일
yeah thats smooth
Tay
Tay 2020년 5월 8일
Thanks guys !! It's perfectly working !! :D :)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by