Calton板的数值模拟
- ·磁盘阵列(Disk Array)原理
图1
3实验代码:
%----simulate of calton board----
%--global variable--
% the possibility of left drop direction.
p=0.7;
% the level that the ball should pass
level=7;
% the number of the ball generated which in one trial.
n_balls=10000;
% array to store the num in each tunnel.
a=zeros(1,level+1);
aStatics=zeros(1,n_balls);
% the tunnel looks from left.
leftPos=1;
% iter val
i=0;
iBallCount=0;
tmpRnd=0;
%--core simulatioin--
%total ball simulate
while iBallCount<n_balls
%--each ball selection--
i=0;leftPos=1;
%drop levels selection
while i<level
tmpRnd=rand(1,1);
%select forward direction.
if(tmpRnd>=p)
leftPos=leftPos+1;
end
i=i+1;
end
%note each simulation ball's last pos.
a(leftPos)=a(leftPos)+1;
aStatics(iBallCount+1)=leftPos;
iBallCount=iBallCount+1;
end
hist(aStatics,level+1)
4实验结果:
图2及图3展示了测试粒子为10000粒子时,左转概率p分别为0.5及0.7的分布情况,可以看出,结果很好的验证了Calton板的极限分布服从二项分布这一推论。
图2
图3
参考文献:
[1]基于Matlab的Calton板实验仿真设计及实现,计算机仿真,2006.3
程序完成日:
文章完成日:
附录:
1测试程序下载:
http://emilmatthew.51.net/EmilPapers/06_15Calton/code.rar
若直接点击无法下载(或浏览),请将下载(或浏览)的超链接粘接至浏览器地址栏后按回车.若不出意外,此时应能下载。
若下载中出现了问题,请参考:
http://blog.csdn.net/emilmatthew/archive/2006/04/08/655612.aspx
进入讨论组讨论。- 最新文章
- 一个无奈的程序设计练习题[02-19]
- MVP2006成都聚会图片[02-19]
- drwtsn32 调试windows程序[02-19]
- 青少年培养与网络文化漫谈(上篇)[02-19]
- 关于N皇后问题高效试探回溯算法的分析[02-19]
- 缺陷管理的工业标准用语及其含义。[02-19]
- 相关文章
