Poisson Point Process on a sphere

2 ビュー (過去 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.

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by