Problem with plotting dots in points
4 次查看(过去 30 天)
显示 更早的评论
Hi,
I have problem I wanted to plot dots in points but It shows only last dot
figure(2);
A = [1,2,3,4,5,6,7,8]
Y = [1,2,3,4,5,6,7,8]
i = 8;
for c = 1:i
hold on
plot(A(i),Y(i),'r.')
end
0 个评论
回答(1 个)
Jan
2022-3-17
编辑:Jan
2022-3-17
The loop does not depend on the loop counter:
i = 8; % <- this is the index in all iterations
for c = 1:8
I assume you mean:
for i = 1:8
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!