p=arrayfun(@(x) binopdf(x,10,0.4),0:10) %分布律
f=arrayfun(@(x) binocdf(x,10,0.4),0:10) %分布函数
binopdf(3,10,0.4) %P(X=3)
p =
0.0060 0.0403 0.1209 0.2150 0.2508 0.2007 0.1115 0.0425 0.0106 0.0016 0.0001
f =
0.0060 0.0464 0.1673 0.3823 0.6331 0.8338 0.9452 0.9877 0.9983 0.9999 1.0000
ans =
0.2150