Title: Experiments in Mathematics
1????
Experiments in Mathematics
????????
?????????????
2????
1??Matlab????(?)????????,???????????????????.
2????????(?)????????? ??.
????
1?????????.
2????????????.
3???????(?)?????.
????
MATLAB
3? ? ? ?
1???
42????????
53?????
6? ? ? ?
1???
72????? ???????????
84????????
95????????????
6?????????
1)??
102)???????
113)?????
?????????????????????,?????,?????,??????????????
12(No Transcript)
13?????
1??????
14(No Transcript)
15(No Transcript)
16?????????
17(No Transcript)
18??????MATLAB??
??gauss???,gauss?? function A,ugauss(a,n) for
k1n-1 ???? for ik1n for
jk1n1 ??a(k,k)0,????? if
abs(a(k,k))gt1e-6 ???k??????
a(i,j)a(i,j)-a(i,k)/a(k,k)a(k,j)
19 else a(k,k)0,??gauss????
disp('??gauss????') pause
exit end end
end end ???? x(n)a(n,n1)/a(n,n)
20for in-1-11 s0 for ji1n
ssa(i,j)x(j) end x(i)(a(i,n1)-s)/a(i,i
) end ??gauss???????? Atriu(a) ??????? ux
21?1 ???????????
222????????
23????????MATLAB??
???gauss???? function A,ugauss(a,n) ???? for
k1n-1 ??? c0 for qkn if
abs(a(q,k))gtc ca(q,k) lq
24 end end ?????0,???A??? if
abs(c)lt1e-10 disp('error') pause
exit end ??l???k,????l???k? if lk
for qkn1
25tempa(k,q) a(k,q)a(l.q)
a(l,q)temp end end ???k?????
for ik1n for jk1n
a(i,j)a(i,j)-a(i,k)/a(k,k)a(k,j) end
end
26end ???? x(n)a(n,n1)/a(n,n) for in-1-11
s0 for ji1n ssa(i,j)x(j)
end x(i)(a(i,n1)-s)/a(i,i) end
27?????gauss???????? Atriu(a) ??????? ux
?2 ????????????1
28??? ? ?
1?? ? ??????
29(No Transcript)
302????(Jacobian)?????
31Jacobian???MATLAB??
function x,spjac(a,b,n,x1) ?? eones(n,1) ??
???? x2zeros(n,1) ????? k0 ?????????????? wh
ile norm(e,2)gt1e-6 ??5???????
32if (rem(k,5)0) strsprintf('Xd g g g
g\n',k,x1) disp(str) end kk1
??x2(i) for i1n s0 for j1n
ssa(i,j)x1(j) end
33x2(i)(b(i)-s)/a(i,i)x1(i) end ??????
ex2-x1 ?x2???????? x1x2 end ?????? sp
k ????? xx2
34?3???Jacobian????????
352???-???(Gauss-Seidel)?????
36(No Transcript)
374????(Successive Over Relaxation method)???
38(No Transcript)
39????????????
1?????-----???
402????
3????
41(No Transcript)
42??????????????
43(No Transcript)
44(No Transcript)
45?????????????????
yx
y
P0
P2
P4
P3
P1
y
o
x
??????
46P4
yx
y
P2
P0
P1
P3
y
o
x
???????
473 ???????
48????????????
??????????------?????1955?????707??,?????????
?????????????????????????????????
??????
???????????,?????????? ??????????????????????????
????????????????????????
??????
????p,??????,?????????,??????????????????,????????
??????,??????
491?????????,??????????
3????????????????,??????????,????????????????????
?,??????????,??h
50(No Transcript)
51??????
52(No Transcript)