How to store the different sizes of vectors ?
显示 更早的评论
Hello,
I'm working on the following problem. It consists of hexagons with base stations(center red star) and mobile (blue dots).I want to store the coordinates of the mobile users in each hexagon. I'm trying to use the Inpolygon funtion to check whether the points are in the required hexagon or not.I write the code like this:
for i=1:Hexagons_total
IN = inpolygon(user_x,user_y,Hex_cord(i,1:7),Hex_cord(i,8:14));
m_c_x=user_x(IN);
m_c_y=user_y(IN);
m_c=[m_c_x;m_c_y];
end
how to store the coordinates of each hexagon.Suppose if i want to assign the matrix,the size varies from one hexagon to another(because the users are random in each hexagon). Can you guys help me how to store them?Because later I need to add some more mobile users to some hexagons.

采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Clustering 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!