加计算时间的统计

Signed-off-by: dmy@lab <dmy@lab.lab>
This commit is contained in:
dmy@lab
2015-04-26 14:39:53 +08:00
parent 286caf83a4
commit 04e95a448e
3 changed files with 55 additions and 7 deletions

17
theory/t2.m Normal file
View File

@@ -0,0 +1,17 @@
clc
clear
s=0;
loopN=1;
N=1000000;
while 1
P=12;
mP=P.*(1+normrnd(0,0.03));
% s=s+normrnd(0,0.03);
s=s+P-mP;
loopN=loopN+1;
if loopN>N
break
end
end
s=s/N