📄 poisson.m
字号:
function n = poisson(navg)% DESCRIPTION n = mrequest(navg)% an aproximation of a poisson distribution% TRY poisson(10),poisson(0:10),poisson(ones(2,2,2))% by Magnus Almgren 000803siz = size(navg);navg = shiftdim(navg,-1); % free first dimension by shifting them to the rightveclength = round(max(100, 10*max(navg(:)))); n = sum(mplus(rand([veclength siz]),-navg/veclength) < 0,1); % make a realisationn = shiftdim(n,1); % move back again
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -