How to connect the multi scatter?

1 次查看(过去 30 天)
I want to connect pone in a line follow the for loop, the same for ptwo. And suppose that I have 2 first points. This is my code:
for p=1:10
pone=randi(10,1);
ptwo=randi(10,1);
plot(p,pone,'r.',p,ptwo,'c*','MarkerSize',10)
hold on
axis([0 5 0 20])
end
hold off

采纳的回答

Star Strider
Star Strider 2019-5-20
I am not certain what reault you want.
Try this:
p=1:10;
pone=randi(10,1,numel(p));
ptwo=randi(10,1,numel(p));
plot(p,pone,'r.-',p,ptwo,'c*-','MarkerSize',10)
axis([0 5 0 20])
  4 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by