I want to generate random point with Six closest nebulous in cuboid with dimension 100 m
1 回表示 (過去 30 日間)
古いコメントを表示
I want to generate random nodes with Six closest nebhours in cuboid with dimension 100 m
2 件のコメント
採用された回答
KSSV
2019 年 5 月 16 日
% Random point
O = rand(1,3) ;
% Six random points with in cubiod of 100 m
L = 100 ;
n = 6 ;
P = zeros(n,3) ;
for i = 1:3
a = O(i)-L/2 ;
b = O(i)+L/2 ;
P(:,i) = (b-a).*rand(n,1) + a;
end
figure
hold on
plot3(O(1),O(2),O(3),'*r')
plot3(P(:,1),P(:,2),P(:,3),'.b')
2 件のコメント
KSSV
2019 年 5 月 16 日
Dear sir thanku very much for yor prompt response
I want to generate 100 random point with each point aware of 6 closest nebhours in cuboid of dimension 100 m.
Regarding above problem
is there any to find centerod of random point in cuboid, and also find the closest distance from centeroid to nebhours in given cuboid?
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Probability Distributions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!