i am new to matlab and i want to make circle with random 50 points inside it for example but i don't know how then i thought of this code but in pseudo i want to change it to matlab code
1 次查看(过去 30 天)
显示 更早的评论
i am new to matlab and i want to make circle with random 50 points inside it for example but i don't know how then i thought of this code but in pseudo i want to change it to matlab code
01: FOR all nodes j 02: FOR all nodes i except node j 03: IF distance(j to center) < distance(j to i) AND 04: distance(i to cell center) < distance(j to i) 05: THEN there's a red link from node i to node j 06: ELSEIF distance(j to cell center) < distance(j to i) 07: THEN there's a blue link from node i to node j 08: ELSE there's no D2D link from node i and j; 09: node i has a green link with the base station 10: END if 11: END inner for-loop
0 个评论
回答(2 个)
Image Analyst
2014-3-31
See the FAQ: http://matlab.wikia.com/wiki/FAQ#How_do_I_create_a_set_of_random_locations_within_a_circle.3F for some really clever code by Roger Stafford.
2 个评论
Image Analyst
2014-4-11
If that answers your question, you can go ahead and officially accept it to close it out.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Parallel Server 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!