필터 지우기
필터 지우기

Stairs Command MATLAB Ends

조회 수: 3 (최근 30일)
T
T 2013년 10월 18일
댓글: sixwwwwww 2013년 10월 24일
Is it possible to put a circle at the end of the stairs function? If the value is 0 and each end, one cannot see where it starts.

채택된 답변

sixwwwwww
sixwwwwww 2013년 10월 18일
편집: sixwwwwww 2013년 10월 18일
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
T
T 2013년 10월 23일
Now the issue that arises is not only does unchecking the box off removes the stairs function, but there is also the issue of changing the axes when using the plot.
Is there a better alternative?
sixwwwwww
sixwwwwww 2013년 10월 24일
How you want to change the axis when you plot? Can you provide some screen shots what you need and what are you getting right now?

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 10월 18일
편집: Azzi Abdelmalek 2013년 10월 18일
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])

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by