24小时热门版块排行榜    

查看: 5729  |  回复: 10
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

匿名

用户注销 (小有名气)

本帖仅楼主可见
已阅   同方向广播   申请仿真EPI   回复此楼   编辑   查看我的主页

vakikd

铜虫 (小有名气)

【答案】应助回帖

感谢参与,应助指数 +1
这个应该不难吧,给一个粒子,
第一步,随机一个初始位置,一个初始方向,
第二步,分别对三种能量的粒子进行分析,即是分别乘以发射系数
第三步,根据第一步的位置和方向,判断能否被探测器所接收,有方向有位置,探测器位置也有了,实际这一步,就是判断粒子在沿轴方向进行45cm距离后,在不在探测器放盘上,看看一个粒子,三种能量被接受多少(三种粒子有概率的,你懂的)
第四步,取大于1000000个粒子,循环
6楼2012-01-06 01:43:40
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 11 个回答

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

王碎碎狼(金币+1): 有帮助 2012-01-06 09:03:58
写了一个,不知道是不是符合你的要求
CODE:
S=0;
N=5e7;
for i=1:N
     p=rand;
     E=3.0*(p<0.15)+1*(0.15<=p&p<0.4)+0.7*(0.4<=p&p<=1);
     r = -20+40*rand;
     a=-pi/2+pi/2*rand;
if r>=35/2
       a1=atan((35/2-r)/45);
       a2=atan((-35/2-r)/(45+35));
       S=E*(a>=a2&&a<=a1)+S;
elseif r>=-35/2 &r<35/2
      a1=atan((35/2-r)/45);
      a2=atan((-35/2-r)/(45+35));
      S=E*(a>=a2&&a<=a1)+S;
else
      a1=atan((35/2-r)/(45+35));
      a2=atan((-35/2-r)/45);
      S=E*(a>=a2&&a<=a1)+S;  
    end
end
  
Sa=S/N

Sa =

    0.1502
The more you learn, the more you know, the more you know, and the more you forget. The more you forget, the less you know. So why bother to learn.
2楼2011-12-10 10:53:27
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

引用回帖:
2楼: Originally posted by dbb627 at 2011-12-10 10:53:27:
写了一个,不知道是不是符合你的要求
[code]
S=0;
N=5e7;
for i=1:N
     p=rand;
     E=3.0*(p<0.15)+1*(0.15<=p&p<0.4)+0.7*(0.4<=p&p<=1);
     r = -20+40*rand;
     a= ...

原理图如下


The more you learn, the more you know, the more you know, and the more you forget. The more you forget, the less you know. So why bother to learn.
3楼2011-12-10 10:54:16
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

[quote]2楼: Originally posted by dbb627 at 2011-12-10 10:53:27:
写了一个,不知道是不是符合你的要求
CODE:
S=0;
N=5e7;
for i=1:N
     p=rand;
     E=3.0*(p<0.15)+1*(0.15<=p&p<0.4)+0.7*(0.4<=p&p<=1);
     r = -20+40*rand;
     a= ... [/quote]


有点错误
[code]
S=0;
N=5e7;
for i=1:N
     p=rand;
     E=3.0*(p<0.15)+1*(0.15<=p&p<0.4)+0.7*(0.4<=p&p<=1);
     r = -20+40*rand;
     a=-pi/2+pi/2*rand;
if r>=35/2
       a1=atan((35/2-r)/45);
       a2=atan((-35/2-r)/(45+35));
       S=E*(a>=a2&&a<=a1)+S;
elseif r>=-35/2 &r<35/2
     [color=red] a1=atan((35/2-r)/(45+35));[/color]
      a2=atan((-35/2-r)/(45+35));
      S=E*(a>=a2&&a<=a1)+S;
else
      a1=atan((35/2-r)/(45+35));
      a2=atan((-35/2-r)/45);
      S=E*(a>=a2&&a<=a1)+S;  
    end
end
   Sa=S/N

Sa =

    0.1502
The more you learn, the more you know, the more you know, and the more you forget. The more you forget, the less you know. So why bother to learn.
4楼2011-12-10 10:58:49
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
信息提示
请填处理意见