MATLAB: Problem with Stairs plot

stairs

I want to to plot stairs similar to figure. Any idea ?

Best Answer

To achieve a plot as given in the fig.png, you will have to overlay a line plot on a stairstep plot. Use the following example to understand this in detail.
Related Question