How to connect the plot point in matlab
Show older comments
I use the plot commant to plot a graph. Example : Plot(lenght, tension, '-*') ;
But this comment only give the point.
Accepted Answer
More Answers (1)
Image Analyst
on 16 Mar 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 Comment
KARTHIKEYAN M
on 16 Mar 2020
Categories
Find more on Lighting, Transparency, and Shading in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!