⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bulb.m

📁 一些常被用于教学或者参考的概率论的实例的源代码
💻 M
字号:
%bulb.m/created by PJNahin for "Duelling Idiots"(5/9/98)
%This m-file calculates and plots the probability of a bulb,
%wired in series/parallel with sheets of switches, glowing.
%
%
n=input('Number of switches in a row? ')
for p=1:200
   r=p/200;
   P1(p)=(1-(1-r^n)^n)^n;
   P2(p)=1-((1-r^n)^(n*n));
end
r=.005:.005:1;
plot(r,P1,'-',r,P2,'.')
grid
title('Fig.3.4-Solid Line for Series Sheets, Dots for Parallel Sheets')
xlabel('probability, p, an individual switch is closed')
ylabel('probability bulb glows, P(10,p)')
figure(1)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -