MATLAB Answers

How to draw a zigzag line in MATLAB?

45 views (last 30 days)
Lucifer__
Lucifer__ on 19 Nov 2019
Commented: KALYAN ACHARJYA on 19 Nov 2019
I want x and y points from a zigzag line in a x,y mesh/grid. How do I draw it on matlab?

Answers (1)

KALYAN ACHARJYA
KALYAN ACHARJYA on 19 Nov 2019
Edited: KALYAN ACHARJYA on 19 Nov 2019
x=randi(100,[1,10]);
y=randi(100,[1,10]);
line(x,y)
  2 Comments
KALYAN ACHARJYA
KALYAN ACHARJYA on 19 Nov 2019
x=randi(100,[1,10]);
plot(x)

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by