How can I discretize a smooth curve?
조회 수: 7 (최근 30일)
이전 댓글 표시
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
채택된 답변
Cris LaPierre
2020년 5월 7일
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
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!