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

1 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 2-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