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

2 Ansichten (letzte 30 Tage)
How can I plot my curve in the form of steps as given in the attached figure?

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by