How to draw a zigzag line in MATLAB?

조회 수: 21 (최근 30일)
Lucifer__
Lucifer__ 2019년 11월 19일
댓글: KALYAN ACHARJYA 2019년 11월 19일
I want x and y points from a zigzag line in a x,y mesh/grid. How do I draw it on matlab?

답변 (1개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 11월 19일
편집: KALYAN ACHARJYA 2019년 11월 19일
x=randi(100,[1,10]);
y=randi(100,[1,10]);
line(x,y)
  댓글 수: 2
Lucifer__
Lucifer__ 2019년 11월 19일
It is actually just a plot of random x,y's. What I want is a linear zig-zag line on x and y axis. Thanks.
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 11월 19일
x=randi(100,[1,10]);
plot(x)

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by