How to draw a zigzag line in MATLAB?

20 visualizaciones (últimos 30 días)
Lucifer__
Lucifer__ el 19 de Nov. de 2019
Comentada: KALYAN ACHARJYA el 19 de Nov. de 2019
I want x and y points from a zigzag line in a x,y mesh/grid. How do I draw it on matlab?

Respuestas (1)

KALYAN ACHARJYA
KALYAN ACHARJYA el 19 de Nov. de 2019
Editada: KALYAN ACHARJYA el 19 de Nov. de 2019
x=randi(100,[1,10]);
y=randi(100,[1,10]);
line(x,y)
  2 comentarios
Lucifer__
Lucifer__ el 19 de Nov. de 2019
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 el 19 de Nov. de 2019
x=randi(100,[1,10]);
plot(x)

Iniciar sesión para comentar.

Categorías

Más información sobre Tables en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by