Plot with step changes - no interpolation

93 次查看(过去 30 天)
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