Plot with step changes - no interpolation

96 Ansichten (letzte 30 Tage)
John
John am 4 Nov. 2011
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.

Akzeptierte Antwort

Fangjun Jiang
Fangjun Jiang am 4 Nov. 2011
stairs(1:10)

Weitere Antworten (2)

Walter Roberson
Walter Roberson am 4 Nov. 2011
Perhaps a stairs() plot ?

John
John am 4 Nov. 2011
Thank you both.

Kategorien

Mehr zu Line 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