大連理工大學(xué)線性代數(shù)實(shí)驗(yàn)上機(jī)報(bào)告_第1頁
大連理工大學(xué)線性代數(shù)實(shí)驗(yàn)上機(jī)報(bào)告_第2頁
大連理工大學(xué)線性代數(shù)實(shí)驗(yàn)上機(jī)報(bào)告_第3頁
已閱讀5頁,還剩34頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、大連理工大學(xué)線性代數(shù)實(shí)驗(yàn)上機(jī)報(bào)告大連理工大學(xué)線性代數(shù)實(shí)驗(yàn)上機(jī)報(bào)告實(shí)驗(yàn)一首先隨機(jī)生成五階方陣 AA=rand(5)A =0.81470.09750.15760.14190.65570.90580.27850.97060.42180.03570.12700.54690.95720.91570.84910.91340.95750.48540.79220.93400.63240.96490.80030.95950.6787>> B=rand(5) 隨機(jī)生成五階方陣 B B =0.75770.70600.82350.43870.48980.74310.03180.69480.38160.44

2、560.39220.27690.31710.76550.64630.65550.04620.95020.79520.70940.1712 0.0971 0.0344 0.1869 0.7547>> b=rand(1,5)' 隨機(jī)生成列向量 b b =0.27600.67970.65510.16260.1190計(jì)算 A+B>> A+Bans =1.57250.80360.98110.58061.14551.64890.31031.66540.80330.48130.51920.82381.27431.68131.49541.56891.00371.43561.58

3、741.64340.80351.06200.83471.14641.4334計(jì)算 A-B >> A-BqV=x «搦陰q=xv來9L8SCOZLLC68SSCZ8ZZL09£L£0ZL6西眈P9Z9£P176Z6S61706C17£Z9£170LSC01/乙1789SCZ£Z0£01700CZ96LS17606217£OL£9ZSZS6£l7L£890CS88S0C=sue09Z00-9SZZ0899Z08Z980即 91/0917220ocooo-8mo-

4、63;14606Z9S082020209 L0L0W000Z2029920660170-SOWO89ZS0Z917S0ZS9L0099L069620-89990-98090-0Z900=sue-0.98502.43963.3124-5.65151.7085 驗(yàn)證克萊姆法則 >> c=A(:,1)c =0.81470.90580.12700.91340.6324>> d=A(:,2)d =0.09750.27850.54690.95750.9649 >> e=A(:,3) e =0.15760.97060.95720.48540.8003 >> f

5、=A(:,4) f =0.14190.4218 0.91570.7922 0.9595>> g=A(:,5)g =0.65570.03570.84910.93400.6787>> B1=b'd'e'f'g''B1 =0.27600.09750.15760.14190.65570.67970.27850.97060.42180.03570.65510.54690.95720.91570.84910.16260.95750.48540.79220.93400.11900.96490.80030.95950.6787>&g

6、t; B2=c'b'e'f'g''B2 =0.81470.27600.15760.14190.65570.90580.67970.97060.42180.03570.12700.65510.95720.91570.84910.91340.16260.48540.79220.93400.63240.11900.80030.95950.6787>> B3=c'd'b'f'g''B3 =0.81470.09750.27600.14190.65570.90580.27850.67970.4218

7、0.03570.12700.54690.65510.91570.84910.91340.95750.16260.79220.93400.63240.96490.11900.95950.6787>> B4=c'd'e'b'g''B4 =0.81470.09750.15760.27600.65570.90580.27850.97060.67970.03570.12700.54690.95720.65510.84910.91340.95750.48540.16260.93400.63240.96490.80030.11900.6787>

8、;> B5=c'd'e'f'b''B5 =0.81470.09750.15760.14190.27600.90580.27850.97060.42180.67970.12700.54690.95720.91570.65510.91340.95750.48540.79220.16260.63240.96490.80030.95950.1190>> x1=det(B1)/det(A) x1 =-0.9850>> x2=det(B2)/det(A) x2 =2.4396>> x3=det(B3)/det(A)

9、x3 =3.3124>> x4=det(B4)/det(A) x4 =-5.6515>> x5=det(B5)/det(A)x5 =1.7085 計(jì)算 A 的行列式 >> det(A)ans =-0.0250計(jì)算 B 的行列式>> det(B)ans =0.0647求 A 的逆>> inv(A)ans =3.1375 -0.8078 -1.8788 -4.2194 5.1680-8.60763.53142.890713.7204-14.3665-6.28243.72203.613210.0084-12.419013.6173-6.88

10、22-6.3938-23.528827.5825-2.52921.07292.41935.8870-7.2671求 B 的逆>> inv(B)ans =-0.44303.49971.3255-2.6005-0.46971.4047-1.16260.2422-0.4475-0.01190.7210-1.8189-2.06352.44340.0765-0.6122-0.18372.01650.0375-1.25640.0384-0.5157-0.73700.52671.7407求 A 的秩 >> rank(A) ans =5 求 B 的秩>> rank(B)an

11、s =5求 A*B 的行列式 >> det(A*B)ans =-0.0016求 A*B 的逆>> inv(A*B)ans =74.0649 35.0433 31.2288 121.5740 -137.34426.8291-1.2718-2.2922-8.99518.697263.9620-31.4202-29.5061-105.6918 122.3246-9.31965.74524.625911.9660-15.402811.9582-6.3521-3.3817-16.757418.6360>> rank(A*B)ans =5>> det(A)*

12、det(B)ans =-0.0016驗(yàn)證 AB T BTAT, AB 1 B 1A 1,AB BA(1)>> (A*B)'ans =0.95691.55661.62372.27322.25520.69220.94010.49690.93710.80900.94611.64921.68752.35632.38000.75071.58871.88401.94212.14811.13991.52122.21492.45452.4497>> B'*A'ans =0.95691.55661.62372.27322.25520.69220.94010.496

13、90.93710.80900.94611.64921.68752.35632.38000.75071.58871.88401.94212.14811.13991.52122.21492.45452.4497(2)>> inv(B)*inv(A)ans =74.0649 35.0433 31.2288 121.5740 -137.34426.8291-1.2718-2.2922-8.99518.697263.9620-31.4202-29.5061-105.6918 122.3246-9.31965.74524.625911.9660-15.402811.9582-6.3521-3.

14、3817-16.757418.63603)>> A*Bans =0.95690.69220.94610.75071.13991.55660.94011.64921.58871.52121.62370.49691.68751.88402.21492.27320.93712.35631.94212.45452.25520.80902.38002.14812.4497>> B*Aans =2.07191.61352.19781.97691.96351.35281.25661.35491.48501.73721.71861.64541.52291.68941.69001.871

15、42.04232.01132.29322.46250.87970.96970.84890.96900.8317求矩陣 X 使得 AXB=C 首先隨機(jī)生成五階方陣 C >> C=rand(5)0.4984 0.7513 0.9593 0.8407 0.35000.9597 0.2551 0.5472 0.2543 0.19660.34040.50600.13860.81430.25110.58530.69910.14930.24350.61600.22380.89090.25750.92930.4733X=A的逆 *B 的逆>> X=inv(A)*C*inv(B)3.84

16、32-13.88582.14189.4404-4.5871-9.331241.9602-7.910128.468314.8942-7.873835.1218-5.410722.886110.158116.7545-75.607914.678449.3951-24.7450-3.556817.0848-2.901811.26705.4559實(shí)驗(yàn)二1. 驗(yàn)證:對(duì)于一般的方陣A,B,C,D ,AD B C首先隨機(jī)生成方陣 A,B,C,DA=rand(5)0.82580.10670.86870.43140.13610.53830.96190.08440.91060.86930.99610.00460.

17、39980.18180.57970.07820.77490.25990.26380.54990.44270.81730.80010.14550.1450>> B=rand(5)0.85300.07600.41730.48930.78030.62210.23990.04970.33770.38970.35100.12330.90270.90010.24170.51320.18390.94480.36920.40390.40180.24000.49090.11120.0965C=rand(5)0.1320 0.2348 0.1690 0.5470 0.18350.94210.35320

18、.64910.29630.36850.95610.82120.73170.74470.62560.57520.01540.64770.18900.78020.05980.04300.45090.68680.0811>> D=rand(5)0.92940.30630.64430.93900.20770.77570.50850.37860.87590.30120.48680.51080.81160.55020.47090.43590.81760.53280.62250.23050.44680.79480.35070.58700.8443Z=A,B;C,D0.8258 0.1067 0.

19、8687 0.4314 0.13610.85300.07600.41730.48930.53830.96190.08440.91060.62210.23990.04970.33770.99610.00460.39980.18180.35100.12330.90270.90010.07820.77490.25990.26380.51320.18390.94480.36920.44270.81730.80010.14550.40180.24000.49090.11120.13200.23480.16900.54700.92940.30630.64430.93900.94210.35320.6491

20、0.29630.77570.50850.37860.87590.95610.82120.73170.74470.48680.51080.81160.55020.57520.01540.64770.18900.43590.81760.53280.62250.05980.04300.45090.68680.44680.79480.35070.58700.7803求 Z 的行列式0.86930.38970.57970.24170.54990.40390.14500.09650.18350.20770.36850.30120.62560.47090.78020.23050.08110.8443>

21、> det(Z)ans =-0.0295求 det(A)*det(D)-det(B)*det(C)>> det(A)*det(D)-det(B)*det(C)ans =1.8656e-004 隨機(jī)生成對(duì)角矩陣 A>> A=diag(rand rand rand rand rand)A =0.1948 0 0000 0.2259 0000 0 0.170700000 0.2277 0000 0 0.4357隨機(jī)生成對(duì)角矩陣 B >> B=diag(rand rand rand rand rand)0.3111 00000 0.92340000 0 0.4

22、30200000 0.1848 0000 0 0.9049隨機(jī)生成對(duì)角矩陣C>> C=diag(rand rand rand rand rand)C =0.9797 00000 0.43890000 0 0.111100000 0.2581 0000 0 0.4087隨機(jī)生成對(duì)角矩陣D>> D=diag(rand rand rand rand rand)0 0.2622 0 0 0000.6028 0 0000 0.7112 0000 0 0.2217>> Z=A,B;C,DZ =0.194800000.3111000000.225900000.923400

23、0000.170700000.4302000000.227700000.1848000000.435700000.90490.9797 0 0 0 00 0.4389 0 0 00 0.2622 0 0 00.11110 00 00 00 00 00 0 計(jì)算 Z 的行列式 >> det(Z)ans =-1.1243e-0040 00.6028 0 00 0.2581 00 0.7112 00 0 0.40870 0 0.2217計(jì)算 det(A)*det(D)-det(B)*det(C)>> det(A)*det(D)-det(B)*det(C)ans =-9.310

24、7e-005計(jì)算 A*D-B*C 的行列式>> det(A*D-B*C) ans =-1.1243e-004實(shí)驗(yàn)三求 A 列向量組的一個(gè)最大無關(guān)組,并把不屬于 極大無關(guān)組的向量利用極大無關(guān)組表示 .N= 200865083;a=83;b=86;c=50;d=88;e=28;f=63;g=83;h=60;>>A=a,b,c,d,3,4;1,2,3,4,4,3;12,15,22,17,5,7;e,f,g,h, 8,0;>> B=rref(A)1.0000 0 0 0 -0.35480.46560 1.0000 0 0 -1.4905-2.00200 0 1.00

25、00 0 0.04730.39500 0 0 1.0000 1.79841.3383所以 a1,a2,a3,a4 是一個(gè)極大無關(guān)組。 a5=-0,3548a1-1.4905a2+0.0473a3+1.7984a4; a6=0.4656a1-2.0020a2+0.3950a3+1.3383a4.實(shí)驗(yàn)四>> a=83;>> b=86;>> c=50;>> d=88;>> e=28;>> f=63;>> g=83;>> h=60;>> b1=1,1.9,f,c;b2=1,1.8,f,c;A1=

26、a,b,c,d;0.5,1,1.5,2;12,15,22,17;e,f,g,h;A2=a,b,c,d;0.3,0.6,0.9,1.2;12,15,22,17;e,f,g,h;A3=a,b,c,d;0.1,0.2,0.3,0.4;12,15,22,17;e,f,g,h;A4=a,b,c,d;0.05,0.1,0.15,0.2;12,15,22,17;e,f,g,h;>> x1=A1/b1x1 =1.20430.03040.35171.2940>> x2=A2/b1x2 =1.20430.01820.35171.2940>> x3=A3/b1x3 =1.2043

27、0.00610.35171.2940>> x4=A4/b1x4 =1.20430.00300.35171.2940>> x5=A2/b1x5 =1.20430.01820.35171.2940>> x6=A2/b2x6 =1.20310.01820.35141.2931>> x5=A1/b2x5 =1.20310.03040.35141.2931>> x6=A2/b2x6 =1.20310.01820.35141.2931>> x7=A3/b2x7 =1.20310.00610.35141.2931>> x8=

28、A4/b2 x8 =1.20310.00300.35141.2931實(shí)驗(yàn)五隨機(jī)生成 4 個(gè) 5 維向量,并進(jìn)行正交化隨機(jī)生成 4個(gè) 5維向量a=rand(4,5);>> aa =0.11740.50790.02920.57850.54680.29670.08550.92890.23730.52110.31880.26250.73030.45880.23160.42420.80100.48860.96310.4889正交化>> b=null(a)0.6777-0.5941-0.30090.28920.1163實(shí)驗(yàn)六隨機(jī)生成 5 階矩陣 ,求其特征值及對(duì)應(yīng)特征向量eig(A

29、)ans =3.20370.5684-0.1026 + 0.5388i-0.1026 - 0.5388i-0.0457>> d,v=eig(A)0.2283-0.53540.0179 + 0.1710i0.0179- 0.1710i-0.13830.32430.14990.70770.70770.46290.51410.7181-0.1450 + 0.3831i-0.1450- 0.3831i0.31060.5300-0.4077-0.33020.3239i-0.3302 + 0.3239i-0.79140.54550.0944-0.1645 -0.2465i-0.1645 + 0.2465i0.2091d 的每一列即為一個(gè)特征向量3.2037000000.568400000-0.1026 + 0.5388i00000-0.10260.5388i00000-0.0457V中非零值即為每一列特征向量對(duì)應(yīng)的特征值隨機(jī)生成 5 維列向量 x第一組>> X=rand(1,5)'0.60200.26300.65410.68920.7482 求 X*X'>> X*X'ans =0.36240.15830.39370.41490.45040.15830.06920.17200.18120.19670.

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論