How to connect the plot point in matlab
Mostrar comentarios más antiguos
I use the plot commant to plot a graph. Example : Plot(lenght, tension, '-*') ;
But this comment only give the point.
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 16 de Mzo. de 2020
Try indexing the vectors and using "hold on":
for k = 1 : whatever
allLengths(k) = whatever;
allTensions(k) = whatever;
plot(allLengths, allTensions, '-*');
hold on;
drawnow;
end
Or if you want, you can just call plot() once outside the loop rather than inside the loop:
for k = 1 : whatever
allLengths(k) = whatever;
allTensions(k) = whatever;
end
plot(allLengths, allTensions, '-*');
1 comentario
KARTHIKEYAN M
el 16 de Mzo. de 2020
Categorías
Más información sobre Lighting, Transparency, and Shading en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!