Poisson Point Process on a sphere

3 次查看(过去 30 天)
wiem abd
wiem abd 2020-6-3
回答: rumin diao 2022-5-16
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
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
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.

标签

Community Treasure Hunt

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

Start Hunting!

Translated by