Poisson Point Process on a sphere
조회 수: 3 (최근 30일)
이전 댓글 표시
I would like to generate points according to a Poisson Point Process on the surface of Earth.
I tried out the following code :
R_E=6.371 % km earth's radius
%Point process parameters
lambda=0.001; %intensity (ie mean density) of the Poisson process
areaTotal=4/3*pi*(R_E)^3; %volume of sphere
%Simulate Poisson point process
numbPoints=poissrnd(areaTotal*lambda);%Poisson number of points
theta=R_E*2*pi*(rand(numbPoints,1)); %angular coordinates
phi=R_E*pi/2*(-1+2*rand(numbPoints,1));
rho=R_E*ones(numbPoints,1);%radial coordinates
I understand that I got the following error message because the Earth radius is expressed in km
Requested 1083143792x1 (8.1GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive.
How can I overcome this problem?
댓글 수: 1
John D'Errico
2020년 6월 3일
You got that error message NOT because the earth's radius is expressed in any particular units. You got it because you tried to generate an array that is too large to fit into your memory.
Generate a smaller array, and the problem will go away. Or get more memory.
Your computer is not infinitely large, nor infinitely fast.
답변 (1개)
rumin diao
2022년 5월 16일
hey, i'm not quite understand the method of poisson point process on a sphere, why do you generate theta and phi with R_E, isn't the two angle independent of R_E? is there any paper about poisson point process on a sphere, i will thank you a lot if you help.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!