theory.m
来自「一些常被用于教学或者参考的概率论的实例的源代码」· M 代码 · 共 22 行
M
22 行
%theory.m/created by PJNahin for "Duelling Idiots"(6/10/98)
%This m-file plots the theoretical distribution function
%for Problem 17.
%
%
factor=2/pi;
for l = 1:1414
lscale=l/1000;
if l<1000
F(l)=factor*lscale;
else
F(l)=factor*(1+2*acos(1/lscale)-sqrt(lscale^2-1));
end
end
x=.001:.001:1.414;
plot(x,F)
grid
xlabel('length')
ylabel('probability')
title('Fig.17.7 - Theoretical Distribution Function')
figure(1)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?