フィルターのクリア

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 Center および File Exchange2-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