Borrar filtros
Borrar filtros

Plot with step changes - no interpolation

58 visualizaciones (últimos 30 días)
John
John el 4 de Nov. de 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.

Respuesta aceptada

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

Más respuestas (2)

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

John
John el 4 de Nov. de 2011
Thank you both.

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by