主题
: [MATLAB数学相关]
求极限
查看单个帖子
2009-11-03, 18:57
#
1
nnsghhz
初级会员
注册日期: 2009-11-03
帖子: 1
声望力:
0
求极限
matlab程序如下,现要求当Nfinal趋向于正无穷时,P1和P2的值
Nfinal=1e6;
P=0;
Q=0;
for N=1:Nfinal;
pp=rand(1,2);
Q=Q+(1./(1+pp(1,1).^2)>=pp(1,2));
P=P+(pp(1,1)./(1+pp(1,1).^2)>=pp(1,2));
end
P1=Q/Nfinal
P2=P/Nfinal
nnsghhz
查看公开信息
发送悄悄话给 nnsghhz
查找 nnsghhz 发表的更多帖子