Effacer les filtres
Effacer les filtres

Plot with step changes - no interpolation

58 vues (au cours des 30 derniers jours)
John
John le 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.

Réponse acceptée

Fangjun Jiang
Fangjun Jiang le 4 Nov 2011
stairs(1:10)

Plus de réponses (2)

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

John
John le 4 Nov 2011
Thank you both.

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by