【 – 字数作文】
第一篇:《彩票数据和程序》
中奖概率
A =
[2.0000e-007 8.0000e-007 1.8000e-005 2.6100e-004 0 0 0 2.0000e-007 8.0000e-007 1.8000e-005 2.6100e-004 3.4200e-003 4.2039e-002 0 2.0000e-007 8.0000e-007 1.8000e-005 2.6100e-004 3.4200e-003 4.2039e-002 0 2.0000e-007 8.0000e-007 1.8000e-005 2.6100e-004 3.4200e-003 4.2039e-002 0
6.4071e-007 4.4849e-006 9.4184e-005 2.8255e-004 2.8000e-003 4.7000e-003 0
6.4071e-007 1.4096e-005 8.4573e-005 8.8802e-004 2.2000e-010 1.4800e-009 0
4.9121e-007 3.4385e-006 7.5646e-005 2.2694e-004 2.4000e-003 4.0000e-003 2.6500e-002
4.9121e-007 3.4385e-006 7.5646e-005 2.2694e-004 2.4000e-003 4.0000e-003 2.6500e-002
4.9121e-007 3.4385e-006 7.5646e-005 2.2694e-004 2.4000e-003 4.0000e-003 2.6500e-002
3.8029e-007 2.2662e-006 6.1227e-005 1.8368e-004 2.0000e-003 3.4000e-003 2.3600e-002
3.8029e-007 2.2662e-006 6.1227e-005 1.8368e-004 2.0000e-003 3.4000e-003 0
2.9710e-007 2.0797e-006 4.9913e-005 1.4974e-004 1.7000e-003 2.7000e-003 0
2.9710e-007 2.0797e-006 4.9913e-005 1.4974e-004 1.7000e-003 2.7000e-003 0
2.9710e-007 2.0797e-006 4.9913e-005 1.4974e-004 1.7000e-003 2.7000e-003 0
2.3408e-007 1.6386e-006 4.0964e-005 1.2289e-004 1.5000e-003 2.5000e-003 0
2.3408e-007 1.6386e-006 4.0964e-005 1.2289e-004 1.5000e-003 2.5000e-003 1.8800e-002
1.8589e-007 1.3012e-006 3.3831e-005 1.0149e-004 1.3000e-003 2.1000e-003 0
1.8589e-007 1.3012e-006 3.3831e-005 1.0149e-004 1.3000e-003 2.1000e-003 1.6900e-002
1.4871e-007 1.0410e-006 2.8106e-005 8.4318e-005 1.1000e-003 1.8000e-003 0
1.4871e-007 1.0410e-006 2.8106e-005 8.4318e-005 1.1000e-003 1.8000e-003 1.5200e-005
1.4871e-007 1.0410e-006 2.8106e-005 8.4318e-005 1.1000e-003 1.8000e-003 1.5200e-002
1.4871e-007 1.0410e-006 2.8106e-005 8.4318e-005 1.1000e-003 1.8000e-003 1.5200e-002
1.4871e-007 2.9147e-005 1.2000e-003 1.7100e-002 1.0660e-001 0 0
1.1979e-007 3.4740e-006 2.0844e-005 2.9182e-004 7.2954e-004 6.6000e-010 8.8000e-010
1.1979e-007 3.4740e-006 2.0844e-005 2.9182e-004 7.2954e-004 6.6000e-010 0
1.1979e-007 8.3856e-007 2.3480e-005 7.0439e-005 9.5920e-004 1.6000e-003 1.3700e-002
9.7130e-008 6.7991e-007 1.9717e-005 5.9152e-005 8.2813e-004 1.3800e-003 0
2.6053e-007 1.5632e-006 5.1584e-005 1.2896e-004 2.1000e-003 2.8000e-003 0
1.8310e-007 9.1550e-007 4.9437e-005 9.8874e-005 2.6000e-003 0 0]
概率求解
function cai1()
m=29;
n=7;
l=nchoosek(m,n)*nchoosek(m-n,1);
p1=nchoosek(m-n,1);
p2=nchoosek(n,n-1)*nchoosek(m-n-1,1);
p3=nchoosek(n,n-1)*nchoosek(m-n-1,2);
p4=nchoosek(n,n-2)*nchoosek(m-n-1,2);
p5=nchoosek(n,n-2)*nchoosek(m-n-1,3);
p6=nchoosek(n,n-3)*nchoosek(m-n-1,3);
p7=nchoosek(n,n-3)*nchoosek(m-n-1,4);
format long
p=[p1 p2 p3 p4 p5 p6 p7]/l
function cai2()
m=input('m=','s');
n=input('n=','t');
l=nchoosek(m,n)*nchoosek(m-n,1);
p1=nchoosek(m-n,1);
p2=nchoosek(m-n-1,1);
p3=nchoosek(n,n-1)*nchoosek(m-n-1,1);
p4=nchoosek(n.n-1)*nchoosek(m-n-1,2);
p5=nchoosek(n,n-2)*nchoosek(m-n-1,2);
p6=nchoosek(n,n-2)*nchoosek(m-n-1,3);
p7=nchoosek(n,n-3)*nchoosek(m-n-1,3);
format long
p
function bocai()
options=optimset('LargeScal','off');
D0=[37 7 0.7 0.2 0.1 500 50 20 10];
vlb=[0 0 0 0 0 100 0 0 0];
vub=[150 150 150 150 150 1000 150 100 100 ];{1.6386E,19}.
[D,val]=fmincon(@fun,D0,[],[],[],[],vlb,vub,@funcon,options);
format short e;
D
val=-val
function f=fun(D)
global D;
p=cai1(D(1),D(2));
a=sum(p);u=1e8*(p(1)^2+p(2)^2+p(3)^2)/(p(4)*D(6)+p(5)*D(7)+p(6)*D(8)+p(7)*D(9));
k=-1e8*(abs(p(1)*p(1)-p(2)^2)+abs(p(2)^2-p(3)^2))-abs(p(4)*D(6)-p(5)*D(7))-abs(p(5)*D(7)-p(6)*D(8))-abs(p(6)*D(8)-p(7)*D(9));
f=a*u*k;
return
function [c,ceg]=funcon(D)
global D;
%p=@cai1(D(1),N)
%for i=1:5,
p=cai1(D(1),D(2));
c=[D(3)-0.8;0.5-D(3);D(3)*1e8*(1-p(4)*D(6)+p(5)*D(7)+p(6)*D(8)+p(7)*D(9))-5e6;6e5-D(3)*1e8*(1-p(4)*D(6)+p(5)*D(7)+p(6)*D(8)+p(7)*D(9));p(i)-p(i+1);5-D(1);D(1)-7;29-D(2);D(2)-60];
ceg=[D(3)+D(5)+D(4)-1] ;
return
function p=cai1(m,n)
m=round(m);n=round(n);
l=nchoosek(m,n)*nchoosek(m-n,1);
p1=nchoosek(m-n,1);
p2=nchoosek(n,n-1)*nchoosek(m-n-1,1);
p3=nchoosek(n,n-1)*nchoosek(m-n-1,2);
p4=nchoosek(n,n-2)*nchoosek(m-n-1,2);
p5=nchoosek(n,n-2)*nchoosek(m-n-1,3);
p6=nchoosek(n,n-3)*nchoosek(m-n-1,3);
p7=nchoosek(n,n-3)*nchoosek(m-n-1,4);
format short e
p=[p1 p2 p3 p4 p5 p6 p7]/l
return
第二篇:《matlae》
3-1.什么是线性系统?其主要的特征是什么?
答:凡是用线性微分方程来描述其动态特性的系统称为线性系统。
特征:可运用叠加原理进行计算。
3-2.
(1) f(t)-k*y(t)=mdy/dt
(2 ) f(t )-k1*(k2*y(t)-f(t)/k2-k1)-k2*(y(t)*k1-f(t)/k1-k2)=mdy(t)/dt
3-3
(a)设i1为流过R1的电流,i为总电流,则有
U0=Ri+1/C2*∫idt
Ui-U0=i1*R1
Ui-U0=1/C1*∫(i-i1)dt
化简得
C1*R2*(U0)¨+(1+R2/R1+C1/C2)*(U0)’+U0/C2*R1
=C1*R2 (Ui)¨=(R2/R1+C1/C2)Ui’+Ui/C2*R1{1.6386E,19}.
(b)
设电流为I,则有
Ui=U0+R1*i+1/C1*∫idt
U0=1/C2*∫idt+ R2*i
3-4
M=J(θ)+Cm*¨θ’+Rk*(Rθ’-x)
K(Rθ-x)=mx¨+Cx’
消去中间x得
m*Jθ(4)+(m*Cm+Cj) θ(3)+R*k*m+Cm*c+Jk) (θ) ¨+k(c*R+Cm) θ’
=m*M¨+c*M’+k*M
3-5
(1)(s+15s+50s+500)Y(S)=(s+2s)U(s) (2) (5s+25s)Y(S)=(0.5s)U(s)
G=Y(S)/U(S) G=Y(S)/U(S)
num=[1 2 0] num=[0.5 0]
num = num =
1 2 0 0.5000 0
>> den=[1 15 50 500] den=[5 25 0]
den = den =
1 15 50 500 5 25 0
>> G=tf(num,den) >> G=tf(num,den)
Transfer function: Transfer function:
s^2 + 2 s 0.5 s
————————- ————
s^3 + 15 s^2 + 50 s + 50 5 s^2 + 25 s
(3) (s+3s+6+4*1/s)Y(S)=(4s)U(s)
G=Y(S)/U(S){1.6386E,19}.
num=[4 0]
num =
4 0
>> den=[1 3 6 4]
den =
1 3 6 4
>> G=tf(num,den)
Transfer function:
4 s
———————
s^3 + 3 s^2 + 6 s +
3-6
由传递函数定义得
Xi=1/s
Y=1/s-1/(s+2)+2/(s+1)
Y/Xi=(2s+6s+2)/(s+3s+2)
3-8
(1) num=[1 35 291 1093 1700]
num =
1 35 291 1093 1700
>> den=[1 298 0 2541 4684 5856 4629 1700]
den =
1 298 0 2541 4684 5856 4629 1700
>> G=tf(num,den)
Transfer function:
s^4 + 35 s^3 + 291 s^2 + 1093 s + 1700
————————————————————–
s^7 + 298 s^6 + 2541 s^4 + 4684 s^3 + 5856 s^2 + 4629 s + 1700
sys_zpk=zpk(sys_tf)
Zero/pole/gain:
(s+25) (s+4) (s^2 + 6s + 17)
———————————————————————————
(s+298) (s^2 + 1.379s + 0.5664) (s^2 + 0.4945s + 1.032) (s^2 – 1.902s + 9.758)
(2) num=15*[1 1]
num =
15 15
>> den=conv(conv([1 3],[1 5]),[1 15])
den =
1 23 135 225
>> sys=tf(num,den)
Transfer function:
15 s + 15
————————–
s^3 + 23 s^2 + 135 s + 225
>> z=-1;
p=[-3 -5 -15];
k=15;
sys=zpk(z,p,k)
Zero/pole/gain:
15 (s+1)
——————
(s+3) (s+5) (s+15)
(3)
sys1=zpk([0,-1,-2,-2],[-1,1],100);
sys2=tf([1,3,2],[1,2,5,2]);
sys3=tf(1,[1,2,4]);
sys4=tf(1,[1,2,4])
sys=sys1*sys2*sys3*sys4
Zero/pole/gain:
100 s (s+1)^2 (s+2)^3
—————————————————————-
(s+1) (s+0.4668) (s-1) (s^2 + 2s + 4)^2 (s^2 + 1.533s + 4.284)
>> sys_tf=tf(sys)
Transfer function:
100 s^6 + 800 s^5 + 2500 s^4 + 3800 s^3 + 2800 s^2 + 800 s{1.6386E,19}.
—————————————————————————— s^9 + 6 s^8 + 24 s^7 + 56 s^6 + 91 s^5 + 74 s^4 – 4 s^3 – 104 s^2 – 112 s – 32 3-9
3-9 (1) 解
>> A=[5,2,1,0;0,4,6,0;0,-3,-5,0;0,-3,-6,-1];
>> B=[1;2;3;4];
>> C=[1,2,5,2];
>> D=zeros(1,1)
>> sys=ss(A,B,C,D)
a =
x1 x2 x3 x4
x1 5 2 1 0
x2 0 4 6 0
x3 0 -3 -5 0
x4 0 -3 -6 -1
b =
u1
x1 1{1.6386E,19}.
x2 2
x3 3
x4 4
c =
x1 x2 x3 x4
y1 1 2 5 2
d =
u1
y1 0
Continuous-time model.
>> sys_tf=tf(sys)
Transfer function:
28 s^3 – 181 s^2 + 317 s + 46 ——————————-
s^4 – 3 s^3 – 11 s^2 + 3 s + 10
>> sys_zpk=zpk(sys)
Zero/pole/gain:
28 (s+0.1346) (s^2 – 6.599s + 12.21) ————————————- (s-5) (s+2) (s+1) (s-1)
(2)解
>> A=[2,2,1;1,3,1;1,2,2];
>> B=[3;3;4];
>> C=[1,0,0];
>> D=zeros(1,1);
>> sys=ss(A,B,C,D)
a =
第三篇:《E级GPS技术设计书》
GPS控制测量技术总结