作者mitsuyo (光世)
看板MATLAB
标题[问题]
时间Sat Dec 14 22:19:16 2013
point_x= [240:3:320];
point_y= [240:3:320];
figure(1)
hold on
for qy=1:length(point_y)
for qx=1:length(point_x)
figure(1)
plot(point_x(qx),point_y(qx),'+','color','b')
end
end
http://imgur.com/xYmPawH
您好,请问一下, 因为需要扫描资料的值, 我自己写了一段能够扫出特定区域
但我要扫描的区域不可能一直都是方型的, 有可能是这样
http://imgur.com/a4q4mE4,2lE1CK3
以我所学就只有方型的, 想问各位要怎麽写, 才能写出梯形或是三角型的座标
谢谢各位
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.33.192.213
※ 编辑: mitsuyo 来自: 114.33.192.213 (12/14 22:20)
1F:→ wallaceboy:我会先定义梯形 or 三角形的边界 然後一样跑回圈 12/15 11:36
2F:→ wallaceboy:再利用find指令 看哪些点落在里面 不知道降有没帮到你 12/15 11:37
3F:→ ejialan:定义边界 然後用inpolygon 12/16 10:18