How can I change the slopes of stairs plot?

조회 수: 5 (최근 30일)
Arduino Arduini
Arduino Arduini 2016년 10월 10일
편집: Marco Tullio 2016년 10월 10일
The sequence of strokes is: horizontal, vertical _|. How to change it: vertical, horizontal |-?

채택된 답변

Marco Tullio
Marco Tullio 2016년 10월 10일
편집: Marco Tullio 2016년 10월 10일
Try
x = [1 2 3]
y = [5 6 7]
stairs(x,y,'-.o')
axis([0 11 0 11])
% repeat 1st x
% shift up the y
nx = [x(1) x]
ny = [y(1) y(2:end) y(end)]
hold on
stairs(nx,ny,'-x')

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by