how to draw multiple dots in between two vertical lines?
1 次查看(过去 30 天)
显示 更早的评论
Hello I want to draw multiple dots in between two vertical lines? Will you please help me?
0 个评论
回答(1 个)
Azzi Abdelmalek
2015-7-10
x1=[ 1 1 ]
y1=[-1 1 ]
x2=[ 2 2]
y2=[ -1 1]
plot(x1,y1,x2,y2,'linewidth',4)
[ii,jj]=meshgrid(linspace(x1(1),x2(1),20),linspace(y1(1),y1(2),20))
hold on
scatter(ii(:),jj(:),'.')
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 NaNs 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!