Poisson point process in matlab

那年仲夏 提交于 2019-12-04 22:17:47

I think your solution should be following. (Note : Two different methods of drawing PPP spatial distribution)

clear all;
clc;
close all;

lambda=50;

%Method 1
pproc  = poissrnd(lambda, 100, 2);
size(pproc)
plot(pproc(:, 1), pproc(:, 2), '.');
title('Poisson with poissrnd')

%Method 2
pproc2 = random('Poisson', lambda, 100, 2);
size(pproc2)
figure;
plot(pproc2(:, 1), pproc2(:, 2), '.');
title('Poisson with Random statement')

total lambda = 0.4. I want to have 100 unit. This means unit intensity = 0.4 * 100 = 40. thank you so much.

 la=0.4;
 lala=0.4*100;
  npoints = poissrnd(lala);

  pproc = rand(npoints, 2);

  plot(pproc(:, 1).*100, pproc(:, 2).*100, '.');

Please check the figure in my question at the end.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!