Plot with step changes - no interpolation

조회 수: 96 (최근 30일)
John
John 2011년 11월 4일
Hello,
The standard for plotting a line in matlab is that the line is drawn with a constant slope between the points. I would like to plot something where each subsequent y-value represents a step change in rate. The resulting plot would look blocky, rather than smoothed between the points. Any suggestions that will help me with this?
Thank you.

채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 11월 4일
stairs(1:10)

추가 답변 (2개)

Walter Roberson
Walter Roberson 2011년 11월 4일
Perhaps a stairs() plot ?

John
John 2011년 11월 4일
Thank you both.

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by