?? match.m
字號:
%match.m/created by PJNahin for "Duelling Idiots"(6/3/98)
%This m-file computes the probability that N people,
%flipping fair coins n times, will each get the same
%number of heads.
%
%
n=input('How many flips? ')
N=input('How many people? ')
summation=0;
for k=0:n
bc=binomial(n,k); %call binomial coefficient function
summation=summation+(bc)^N;
end
summation/(2^(N*n))
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -