📄 s1rout1.m
字号:
% Routine 1.1p = 1/3; % one in three volunteers show upfor n=60:80 % start with 60 calls pk = (1-p)^n; % this is p(0)
sum = 0; % initialize the sum for k=1:19 % recursively compute p(19) pk = (n-k+1)*p*pk/k/(1-p); % p(k) from p(k-1) sum = sum + pk; % sum terms end; % summation complete for this nE(n) = sum; % tabulate summationsend; % tried up to 80 callsplot(E) % graph falls below .1?
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -