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

조회 수: 2 (최근 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 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