版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、專業(yè) 姓名 學(xué)號 成績第一次練習(xí)教學(xué)要求:熟練掌握Matlab軟件的基本命令和操作,會作二維、三維幾何圖形,能夠用Matlab軟件解決微積分、線性代數(shù)與解析幾何中的計算問題。補充命令vpa(x,n)顯示x的n位有效數(shù)字,教材102頁fplot(f(x),a,b)函數(shù)作圖命令,畫出f(x)在區(qū)間a,b上的圖形在下面的題目中為你的學(xué)號的后3位(1-9班)或4位(10班以上)1.1 計算與程序:syms xlimit(1001*x-sin(1001*x)/x3,x,0)結(jié)果:1003003001/6程序:syms xlimit(1001*x-sin(1001*x)/x3,x,inf)結(jié)果:01.2
2、,求 程序:syms xdiff(exp(x)*cos(1001*x/1000),2)結(jié)果:-2001/1000000*exp(x)*cos(1001/1000*x)-1001/500*exp(x)*sin(1001/1000*x)1.3 計算程序:dblquad(x,y) exp(x.2+y.2),0,1,0,1)結(jié)果:2.139350195142281.4 計算程序:syms xint(x4/(10002+4*x2)結(jié)果:1/12*x3-1002001/16*x+1003003001/32*atan(2/1001*x)1.5 程序:syms xdiff(exp(x)*cos(1000*x)
3、,10)結(jié)果:-1009999759158992000960720160000*exp(x)*cos(1001*x)-10090239998990319040000160032*exp(x)*sin(1001*x)1.6 給出在的泰勒展式(最高次冪為4). 程序:syms xtaylor(sqrt(1001/1000+x),5)結(jié)果:1/100*10010(1/2)+5/1001*10010(1/2)*x-1250/1002001*10010(1/2)*x2+625000/1003003001*10010(1/2)*x3-390625000/1004006004001*10010(1/2)*x
4、41.7 Fibonacci數(shù)列的定義是,用循環(huán)語句編程給出該數(shù)列的前20項(要求將結(jié)果用向量的形式給出)。程序:x=1,1;for n=3:20 x(n)=x(n-1)+x(n-2);endx結(jié)果:Columns 1 through 10 1 1 2 3 5 8 13 21 34 55 Columns 11 through 20 89 144 233 377 610 987 1597 2584 4181 67651.8 對矩陣,求該矩陣的逆矩陣,特征值,特征向量,行列式,計算,并求矩陣(是對角矩陣),使得。程序與結(jié)果:a=-2,1,1;0,2,0;-4,1,1001/1000;inv(a)
5、0.50100100100100 -0.00025025025025 -0.50050050050050 0 0.50000000000000 0 2.00200200200200 -0.50050050050050 -1.00100100100100eig(a)-0.49950000000000 + 1.32230849275046i -0.49950000000000 - 1.32230849275046i 2.00000000000000p,d=eig(a)p = 0.3355 - 0.2957i 0.3355 + 0.2957i 0.2425 0 0 0.9701 0.8944 0.8
6、944 0.0000 注:p的列向量為特征向量d = -0.4995 + 1.3223i 0 0 0 -0.4995 - 1.3223i 0 0 0 2.0000 a6 11.9680 13.0080 -4.9910 0 64.0000 0 19.9640 -4.9910 -3.0100 1.9 作出如下函數(shù)的圖形(注:先用M文件定義函數(shù),再用fplot進行函數(shù)作圖):函數(shù)文件f.m: function y=f(x)if 0=x&x=1/2 y=2.0*x;else 1/2x&x f=inline(x+1000/x)/2);x0=3;for i=1:20;x0=f(x0);fprintf(%g
7、,%gn,i,x0);end運行結(jié)果:1,168.167 11,31.62282,87.0566 12,31.62283,49.2717 13,31.62284,34.7837 14,31.62285,31.7664 15,31.62286,31.6231 16,31.62287,31.6228 17,31.62288,31.6228 18,31.62289,31.6228 19,31.622810,31.6228 20,31.6228由運行結(jié)果可以看出,數(shù)列收斂,其值為31.6228。2.2 求出分式線性函數(shù)的不動點,再編程判斷它們的迭代序列是否收斂。解:取m=1000.(1)程序如下:f=
8、inline(x-1)/(x+1000);x0=2;for i=1:20;x0=f(x0);fprintf(%g,%gn,i,x0);end運行結(jié)果:1,0.000998004 11,-0.0010012,-0.000999001 12,-0.0010013,-0.001001 13,-0.0010014,-0.001001 14,-0.0010015,-0.001001 15,-0.0010016,-0.001001 16,-0.0010017,-0.001001 17,-0.0010018,-0.001001 18,-0.0010019,-0.001001 19,-0.00100110,-
9、0.001001 20,-0.001001由運行結(jié)果可以看出,分式線性函數(shù)收斂,其值為-0.001001。易見函數(shù)的不動點為-0.001001(吸引點)。(2)程序如下:f=inline(x+1000000)/(x+1000);x0=2;for i=1:20;x0=f(x0);fprintf(%g,%gn,i,x0);end運行結(jié)果:1,998.006 11,618.3322,500.999 12,618.3023,666.557 13,618.3144,600.439 14,618.3095,625.204 15,618.3116,615.692 16,618.317,619.311 17,
10、618.3118,617.929 18,618.319,618.456 19,618.3110,618.255 20,618.31由運行結(jié)果可以看出,分式線性函數(shù)收斂,其值為618.31。易見函數(shù)的不動點為618.31(吸引點)。2.3 下面函數(shù)的迭代是否會產(chǎn)生混沌?(56頁練習(xí)7(1)解:程序如下:f=inline(1-2*abs(x-1/2);x=;y=;x(1)=rand();y(1)=0;x(2)=x(1);y(2)=f(x(1);for i=1:100;x(1+2*i)=y(2*i);x(2+2*i)=x(1+2*i);y(2+2*i)=f(x(2+2*i);endplot(x,y,
11、r);hold on;syms x;ezplot(x,0,1/2);ezplot(f(x),0,1);axis(0,1/2,0,1); hold off運行結(jié)果:2.4 函數(shù)稱為Logistic映射,試從“蜘蛛網(wǎng)”圖觀察它取初值為產(chǎn)生的迭代序列的收斂性,將觀察記錄填人下表,若出現(xiàn)循環(huán),請指出它的周期(56頁練習(xí)8)3.33.53.563.5683.63.84序列收斂情況T=2T=4T=8T=9混沌混沌解:當=3.3時,程序代碼如下:f=inline(3.3*x*(1-x);x=;y=;x(1)=0.5;y(1)=0;x(2)=x(1);y(2)=f(x(1);for i=1:1000;x(1+
12、2*i)=y(2*i);x(2+2*i)=x(1+2*i);y(1+2*i)=x(1+2*i);y(2+2*i)=f(x(2+2*i);endplot (x,y,r);hold on;syms x;ezplot(x,0,1);ezplot(f(x),0,1);axis(0,1,0,1);hold off運行結(jié)果:當=3.5時,上述程序稍加修改,得:當=3.56時,得:當=3.568時,得:當=3.6時,得:當=3.84時,得:2.5 對于Martin迭代,取參數(shù)為其它的值會得到什么圖形?參考下表(取自63頁練習(xí)13)mmm-m-mm-mm/1000-mm/1000m/10000.5m/1000
13、m-mm/100m/10-10-m/10174解:取m=10000;迭代次數(shù)N=20000;在M-文件里面輸入代碼:function Martin(a,b,c,N)f=(x,y)(y-sign(x)*sqrt(abs(b*x-c);g=(x)(a-x);m=0;0;for n=1:N m(:,n+1)=f(m(1,n),m(2,n),g(m(1,n); end plot(m(1,:),m(2,:),kx); axis equal在命令窗口中執(zhí)行Martin(10000,10000,10000,20000),得:執(zhí)行Martin(-10000,-10000,10000,20000),得:執(zhí)行Ma
14、rtin(-10000,10,-10000,20000),得:執(zhí)行Martin(10,10,0.5,20000),得:執(zhí)行Martin(10,10000,-10000,20000),得:執(zhí)行Martin(100,1000,-10,20000),得:執(zhí)行Martin(-1000,17,4,20000),得:2.6 能否找到分式函數(shù)(其中是整數(shù)),使它產(chǎn)生的迭代序列(迭代的初始值也是整數(shù))收斂到(對于為整數(shù)的學(xué)號,請改為求)。如果迭代收斂,那么迭代的初值與收斂的速度有什么關(guān)系.寫出你做此題的體會.提示:教材54頁練習(xí)4的一些分析。若分式線性函數(shù)的迭代收斂到指定的數(shù),則為的不動點,因此化簡得:。若為
15、整數(shù),易見。取滿足這種條件的不同的以及迭代初值進行編。解:取m=10000;根據(jù)上述提示,?。?運行結(jié)果如下:1,0.007777772,9999.43,0.0002000184,100005,0.00026,100007,0.00028,100009,0.000210,1000011,0.000212,1000013,0.000214,1000015,0.000216,1000017,0.000218,1000019,0.000220,1000021,0.000222,1000023,0.000224,1000025,0.000226,1000027,0.000228,1000029,0.0
16、00230,1000031,0.000232,1000033,0.000234,1000035,0.000236,1000037,0.000238,1000039,0.000240,1000041,0.000242,1000043,0.000244,1000045,0.000246,1000047,0.000248,1000049,0.000250,1000051,0.000252,1000053,0.000254,1000055,0.000256,1000057,0.000258,1000059,0.000260,1000061,0.000262,1000063,0.000264,10000
17、65,0.000266,1000067,0.000268,1000069,0.000270,1000071,0.000272,1000073,0.000274,1000075,0.000276,1000077,0.000278,1000079,0.000280,1000081,0.000282,1000083,0.000284,1000085,0.000286,1000087,0.000288,1000089,0.000290,1000091,0.000292,1000093,0.000294,1000095,0.000296,1000097,0.000298,1000099,0.000210
18、0,10000若初值取為1000,運行結(jié)果:1,0.0112,9998.83,0.0002000364,100005,0.00026,100007,0.00028,100009,0.000210,1000011,0.000212,1000013,0.000214,1000015,0.000216,1000017,0.000218,1000019,0.000220,1000021,0.000222,1000023,0.000224,1000025,0.000226,1000027,0.000228,1000029,0.000230,1000031,0.000232,1000033,0.00023
19、4,1000035,0.000236,1000037,0.000238,1000039,0.000240,1000041,0.000242,1000043,0.000244,1000045,0.000246,1000047,0.000248,1000049,0.000250,1000051,0.000252,1000053,0.000254,1000055,0.000256,1000057,0.000258,1000059,0.000260,1000061,0.000262,1000063,0.000264,1000065,0.000266,1000067,0.000268,1000069,0
20、.000270,1000071,0.000272,1000073,0.000274,1000075,0.000276,1000077,0.000278,1000079,0.000280,1000081,0.000282,1000083,0.000284,1000085,0.000286,1000087,0.000288,1000089,0.000290,1000091,0.000292,1000093,0.000294,1000095,0.000296,1000097,0.000298,1000099,0.0002100,10000若初值取為-1,運行結(jié)果:1,4999.52,0.000600
21、13,100004,0.00025,100006,0.00027,100008,0.00029,1000010,0.000211,1000012,0.000213,1000014,0.000215,1000016,0.000217,1000018,0.000219,1000020,0.000221,1000022,0.000223,1000024,0.000225,1000026,0.000227,1000028,0.000229,1000030,0.000231,1000032,0.000233,1000034,0.000235,1000036,0.000237,1000038,0.0002
22、39,1000040,0.000241,1000042,0.000243,1000044,0.000245,1000046,0.000247,1000048,0.000249,1000050,0.000251,1000052,0.000253,1000054,0.000255,1000056,0.000257,1000058,0.000259,1000060,0.000261,1000062,0.000263,1000064,0.000265,1000066,0.000267,1000068,0.000269,1000070,0.000271,1000072,0.000273,1000074,
23、0.000275,1000076,0.000277,1000078,0.000279,1000080,0.000281,1000082,0.000283,1000084,0.000285,1000086,0.000287,1000088,0.000289,1000090,0.000291,1000092,0.000293,1000094,0.000295,1000096,0.000297,1000098,0.000299,10000100,0.0002 第三次練習(xí)教學(xué)要求:理解線性映射的思想,會用線性映射和特征值的思想方法解決諸如天氣等實際問題。3.1 對,求出的通項. 程序:A=sym(4,
24、2;1,3);P,D=eig(A)Q=inv(P)syms n; xn=P*(D.n)*Q*1;2 結(jié)果:P = 2, -1 1, 1D = 5, 0 0, 2Q = 1/3, 1/3 -1/3, 2/3xn =2*5n-2n 5n+2n3.2 對于練習(xí)1中的,求出的通項. 程序:A=sym(2/5,1/5;1/10,3/10); %沒有sym下面的矩陣就會顯示為小數(shù)P,D=eig(A)Q=inv(P)xn=P*(D.n)*Q*1;2 結(jié)果:P = 2, -1 1, 1D = 1/2, 0 0, 1/5Q = 1/3, 1/3 -1/3, 2/3xn = 2*(1/2)n-(1/5)n (1/
25、2)n+(1/5)n3.3 對隨機給出的,觀察數(shù)列.該數(shù)列有極限嗎? endend 結(jié)論:在迭代18次后,發(fā)現(xiàn)數(shù)列存在極限為0.53.4 對120頁中的例子,繼續(xù)計算.觀察及的極限是否存在. (120頁練習(xí)9) A=2.1,3.4,-1.2,2.3;0.8,-0.3,4.1,2.8;2.3,7.9,-1.5,1.4;3.5,7.2,1.7,-9.0;x0=1;2;3;4;x=A*x0;for i=1:1:100a=max(x);b=min(x);m=a*(abs(a)abs(b)+b*(abs(a) A=2.1,3.4,-1.2,2.3;0.8,-0.3,4.1,2.8;2.3,7.9,-1.
26、5,1.4;3.5,7.2,1.7,-9.0;P,D=eig(A)P = -0.3779 -0.8848 -0.0832 -0.3908 -0.5367 0.3575 -0.2786 0.4777 -0.6473 0.2988 0.1092 -0.7442 -0.3874 -0.0015 0.9505 0.2555D = 7.2300 0 0 0 0 1.1352 0 0 0 0 -11.2213 0 0 0 0 -5.8439結(jié)論:A的絕對值最大特征值等于上面的的極限相等,為什么呢?還有,P的第三列也就是-11.2213對應(yīng)的特征向量和上題求解到的y也有系數(shù)關(guān)系,兩者都是-11.2213的特
27、征向量。3.6 設(shè),對問題2求出若干天之后的天氣狀態(tài),并找出其特點(取4位有效數(shù)字). (122頁練習(xí)12) A2=3/4,1/2,1/4;1/8,1/4,1/2;1/8,1/4,1/4;P=0.5;0.25;0.25;for i=1:1:20 P(:,i+1)=A2*P(:,i);endPP = Columns 1 through 14 0.5000 0.5625 0.5938 0.6035 0.6069 0.6081 0.6085 0.6086 0.6087 0.6087 0.6087 0.6087 0.6087 0.6087 0.2500 0.2500 0.2266 0.2207 0.2
28、185 0.2178 0.2175 0.2174 0.2174 0.2174 0.2174 0.2174 0.2174 0.2174 0.2500 0.1875 0.1797 0.1758 0.1746 0.1741 0.1740 0.1739 0.1739 0.1739 0.1739 0.1739 0.1739 0.1739 Columns 15 through 21 0.6087 0.6087 0.6087 0.6087 0.6087 0.6087 0.6087 0.2174 0.2174 0.2174 0.2174 0.2174 0.2174 0.21740.1739 0.1739 0.
29、1739 0.1739 0.1739 0.1739 0.1739結(jié)論:9天后,天氣狀態(tài)趨于穩(wěn)定P*=(0.6087,0.2174,0.1739)T3.7 對于問題2,求出矩陣的特征值與特征向量,并將特征向量與上一題中的結(jié)論作對比. (122頁練習(xí)14) P,D=eig(A2)P = -0.9094 -0.8069 0.3437 -0.3248 0.5116 -0.8133 -0.2598 0.2953 0.4695D = 1.0000 0 0 0 0.3415 0 0 0 -0.0915分析:事實上,q=k(-0.9094, -0.3248, -0.2598)T均為特征向量,而上題中P*的3個分量之和為1,可令k(-0.9094, -0.3248, -0.2598)T=1,得k=-0.6696.有q=(0.6087, 0.21
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 《倉庫現(xiàn)場管理》課件
- 《倉庫庫存管理系統(tǒng)》課件
- 《小學(xué)細節(jié)描寫》課件
- 單位管理制度集粹選集員工管理篇
- 單位管理制度合并匯編【職員管理】
- 四川省南充市重點高中2024-2025學(xué)年高三上學(xué)期12月月考地理試卷含答案
- 單位管理制度分享合集職員管理篇十篇
- 單位管理制度范文大合集【人事管理】十篇
- 單位管理制度呈現(xiàn)大全職工管理篇十篇
- 《運算律》教案(20篇)
- 2024年時事政治試題【有答案】
- 2024年認證行業(yè)法律法規(guī)及認證基礎(chǔ)知識
- MT 285-1992縫管錨桿
- 水資源管理培訓(xùn)材料課件
- SCA自動涂膠系統(tǒng)培訓(xùn)講義
- 促銷活動方案(共29頁).ppt
- 農(nóng)民專業(yè)合作社財務(wù)報表(三張表)
- 培訓(xùn)準備工作清單
- 沉井工程檢驗批全套【精選文檔】
- 貝類增養(yǎng)殖考試資料
- 旅游專業(yè)旅游概論試題有答案
評論
0/150
提交評論