Draw a discontinuous line
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Orongo
el 24 de Oct. de 2018
Comentada: jonas
el 24 de Oct. de 2018
Hi, I want to draw a discontinuous line that will later be used in a another plot. For my example I have written following lines
y1 = [0.6 0.6];
y2=[0.3 0.3];
x1 = [0.7 1.3];
x2=[1.8 2.2];
line(x1,y1); hold on
line(x2,y2); hold off
This is fine for 2 lines but I have more. Can this be written differently? Say for example for 10 discontinuous lines?
1 comentario
Adam
el 24 de Oct. de 2018
You can put your x1, x2,... and y1, y2,... into matrices and loop around the relevant dimension, plotting each piecewise.
Respuesta aceptada
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!