Azzera filtri
Azzera filtri

Plot with step changes - no interpolation

58 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

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

Più risposte (2)

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

John
John il 4 Nov 2011
Thank you both.

Categorie

Scopri di più su Line Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by