Count number of particles within a given radius
古いコメントを表示
I have a question regarding counting number of particles.
Lets say:
- I create a box of domain 100x100 units.
- I put 10000 random particles inside the box by using rand command.
Now what I want is the following:
I want to count the number of neighbour particles of each particle within radius 1 units. i.e each of my particles of 10000 random particles only interact with their neighbour who's distance is = or < 1.
Can anyone help !
3 件のコメント
KSSV
2022 年 4 月 28 日
Are you trying to code SPH?
Alakesh Upadhyaya
2022 年 4 月 28 日
Image Analyst
2022 年 4 月 28 日
OK so you have the location of each particle, but do you have its radius? Or did you mean distance to other nearest particle instead of radius?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Particle Swarm についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!