Poisson Point Process on a sphere
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
John D'Errico
am 3 Jun. 2020
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.
Antworten (1)
rumin diao
am 16 Mai 2022
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 Kommentare
Siehe auch
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!