- 博客(1)
- 收藏
- 关注
原创 线性同余法产生(0,1)均匀分布的随机数
线性同余法产生(0,1)均匀分布的随机数原理maltab代码 clear allclose allclca=16807;c=0;M=2^32;X(1)=10^4;N=4096;for n=1:N-1 X(n+1)=mod(a*X(n),M);endX=X/(M-1);figure(1)plot(X)figure(2)%%hist(X,32)[counts,centers]=hist(X,32);prob=counts/N;figure(3)p
2020-09-16 11:16:51
5111
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人