How can I discretize a smooth curve?
3 次查看(过去 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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/291075/image.png)
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!