필터 지우기
필터 지우기

Count number of particles within a given radius

조회 수: 3 (최근 30일)
Alakesh Upadhyaya
Alakesh Upadhyaya 2022년 4월 28일
댓글: Image Analyst 2022년 4월 28일
I have a question regarding counting number of particles.
Lets say:
  1. I create a box of domain 100x100 units.
  2. 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
Alakesh Upadhyaya
Alakesh Upadhyaya 2022년 4월 28일
No, I have an output of a simulation. The simulation contains particles of 2 types, type 1 and type 2. The file has following columns:
particle id particletype x-pos y-pos. Now I want to find all the neighbours of type 2 particles within radius 1 of each particles.
Image Analyst
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?

댓글을 달려면 로그인하십시오.

채택된 답변

KSSV
KSSV 2022년 4월 28일
REad about knnsearch, rangesearch and inpolygon.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by