Generate N random uniformly distributed points in the d-ball
5 ビュー (過去 30 日間)
古いコメントを表示
How to generate N random uniformly distributed points in the d - ball
0 件のコメント
回答 (2 件)
Bruno Luong
2019 年 1 月 10 日
編集済み: Bruno Luong
2019 年 1 月 10 日
d = 3
n = 10000;
% s is (d x n), n points in unit d-ball
s = randn(d,n);
r = rand(1,n).^(1/d);
c = r./sqrt(sum(s.^2,1));
s = bsxfun(@times, s, c);
0 件のコメント
Moreno, M.
2022 年 3 月 20 日
https://uk.mathworks.com/matlabcentral/fileexchange/108374-uniformly-distributed-points
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Random Number Generation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!