How to plot a graph like attached figure (in the form of steps).

1 回表示 (過去 30 日間)
Nisar Ahmed
Nisar Ahmed 2021 年 5 月 29 日
回答済み: Star Strider 2021 年 5 月 29 日
How can I plot my curve in the form of steps as given in the attached figure?

採用された回答

Star Strider
Star Strider 2021 年 5 月 29 日
Use the stairs function.
Example —
y = linspace(0,10*pi);
x = sin(y)+1000;
figure
stairs(x, y)
xline(1000, '--')
xlim([998 1002])
.

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by