How to draw a zigzag line in MATLAB?

19 ビュー (過去 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 Center および File ExchangeTables についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by