# Stairs Command MATLAB Ends

5 views (last 30 days)

Show older comments

##### 0 Comments

### Accepted Answer

sixwwwwww
on 18 Oct 2013

Edited: sixwwwwww
on 18 Oct 2013

Dear T,

I think you can do as follows (If i understood correctly)

figure

X = linspace(0,4*pi,40);

Y = sin(X);

stairs(X, Y), hold on

plot(X(end), Y(end), 'ro', 'linewidth', 2)

Or maybe you can use different color for next stairs to see difference between two series.

I hope it helps. Good luck!

##### 16 Comments

sixwwwwww
on 24 Oct 2013

### More Answers (1)

Azzi Abdelmalek
on 18 Oct 2013

Edited: Azzi Abdelmalek
on 18 Oct 2013

x=1:10

y=[0 1 0 1 0 1 0 1 0 1]

stairs(x,y,'k')

hold on

scatter(x,y,'or','linewidth',2)

%you can also change ylim

ylim([0 1.5])

##### 0 Comments

### See Also

### Categories

### Community Treasure Hunt

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

Start Hunting!