版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
大連理工大學線性代數(shù)實驗上機報告實驗一首先隨機生成五階方陣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)隨機生成五階方陣BB=0.75770.70600.82350.43870.48980.74310.03180.69480.38160.44560.39220.27690.31710.76550.64630.65550.04620.95020.79520.70940.17120.09710.03440.18690.7547>>b=rand(1,5)'隨機生成列向量bb=0.27600.67970.65510.16260.1190計算A+B>>A+Bans=1.57250.80360.98110.58061.14551.64890.31031.66540.80330.48130.51920.82381.27431.68131.49541.56891.00371.43561.58741.64340.80351.06200.83471.14641.4334計算A-B>>A-B0.79220.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>>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.42180.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>>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)x3=3.3124>>x4=det(B4)/det(A)x4=-5.6515>>x5=det(B5)/det(A)x5=1.7085計算A的行列式>>det(A)ans=-0.0250計算B的行列式>>det(B)ans=0.0647求A的逆>>inv(A)ans=3.1375-0.8078-1.8788-4.21945.1680-8.60763.53142.890713.7204-14.3665-6.28243.72203.613210.0084-12.419013.6173-6.8822-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)ans=5求A*B的行列式>>det(A*B)ans=-0.0016求A*B的逆>>inv(A*B)ans=-74.064935.043331.2288121.5740-137.34426.8291-1.2718-2.2922-8.99518.697263.9620-31.4202-29.5061-105.6918122.3246-9.31965.74524.625911.9660-15.402811.9582-6.3521-3.3817-16.757418.6360>>rank(A*B)ans=5>>det(A)*det(B)ans=-0.0016驗證(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.49690.93710.80900.94611.64921.68752.35632.38000.75071.58871.88401.94212.14811.13991.52122.21492.45452.4497(2)>>inv(B)*inv(A)ans=-74.064935.043331.2288121.5740-137.34426.8291-1.2718-2.2922-8.99518.697263.9620-31.4202-29.5061-105.6918122.3246-9.31965.74524.625911.9660-15.402811.9582-6.3521-3.3817-16.757418.6360(3)>>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.87142.04232.01132.29322.46250.87970.96970.84890.96900.8317求矩陣X使得AXB=C首先隨機生成五階方陣C>>C=rand(5)C=0.49840.75130.95930.84070.35000.95970.25510.54720.25430.19660.34040.50600.13860.81430.25110.58530.69910.14930.24350.61600.22380.89090.25750.92930.4733X=A的逆*B的逆>>X=inv(A)*C*inv(B)X=3.8432-13.88582.14189.4404-4.5871-9.331241.9602-7.9101-28.468314.8942-7.873835.1218-5.4107-22.886110.158116.7545-75.607914.678449.3951-24.7450-3.556817.0848-2.9018-11.26705.4559實驗二1.驗證:對于一般的方陣A,B,C,D,首先隨機生成方陣A,B,C,DA=rand(5)A=0.82580.10670.86870.43140.13610.53830.96190.08440.91060.86930.99610.00460.39980.18180.57970.07820.77490.25990.26380.54990.44270.81730.80010.14550.1450>>B=rand(5)B=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.0965>>C=rand(5)C=0.13200.23480.16900.54700.18350.94210.35320.64910.29630.36850.95610.82120.73170.74470.62560.57520.01540.64770.18900.78020.05980.04300.45090.68680.0811>>D=rand(5)D=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.8443>>Z=[A,B;C,D]Z=0.82580.10670.86870.43140.13610.8530 0.07600.41730.48930.78030.53830.96190.08440.91060.86930.62210.23990.04970.33770.38970.99610.00460.39980.18180.57970.35100.12330.90270.90010.24170.07820.77490.25990.26380.54990.51320.18390.94480.36920.40390.44270.81730.80010.14550.14500.40180.24000.49090.11120.09650.13200.23480.16900.54700.18350.92940.30630.64430.93900.20770.94210.35320.64910.29630.36850.77570.50850.37860.87590.30120.95610.82120.73170.74470.62560.48680.51080.81160.55020.47090.57520.01540.64770.18900.78020.43590.81760.53280.62250.23050.05980.04300.45090.68680.08110.44680.79480.35070.58700.8443求Z的行列式>>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隨機生成對角矩陣A>>A=diag([randrandrandrandrand])A=0.1948000000.2259000000.1707000000.2277000000.4357隨機生成對角矩陣B>>B=diag([randrandrandrandrand])B=0.3111000000.9234000000.4302000000.1848000000.9049隨機生成對角矩陣C>>C=diag([randrandrandrandrand])C=0.9797000000.4389000000.1111000000.2581000000.4087隨機生成對角矩陣D>>D=diag([randrandrandrandrand])D=0.5949000000.2622000000.6028000000.7112000000.2217>>Z=[A,B;C,D]Z=0.194800000.311100000 0.22590000 0.92340000 0 0.1707000 0 0.4302000 00 0.227700 00 0.1848000000.43570 000 0.90490.979700000.5949000000.438900000.2622000000.111100000.6028000000.258100000.7112000000.408700000.2217計算Z的行列式>>det(Z)ans=-1.1243e-004計算det(A)*det(D)-det(B)*det(C)>>det(A)*det(D)-det(B)*det(C)ans=-9.3107e-005計算A*D-B*C的行列式>>det(A*D-B*C)ans=-1.1243e-004實驗三求A列向量組的一個最大無關(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)B=1.0000000-0.35480.465601.000000-1.4905-2.0020001.000000.04730.39500001.00001.79841.3383所以a1,a2,a3,a4是一個極大無關(guān)組。a5=-0,3548a1-1.4905a2+0.0473a3+1.7984a4;a6=0.4656a1-2.0020a2+0.3950a3+1.3383a4.實驗四>>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=[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.20430.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=A4/b2x8=1.20310.00300.35141.2931實驗五隨機生成4個5維向量,并進行正交化隨機生成4個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)b=0.6777-0.5941-0.30090.28920.1163實驗六隨機生成5階矩陣,求其特征值及對應(yīng)特征向量eig(A)ans=3.20370.5684-0.1026+0.5388i-0.1026-0.5388i-0.0457>>[d,v]=eig(A)d=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.3302-0.3239i-0.3302+0.3239i-0.79140.54550.0944-0.1645-0.2465i-0.1645+0.2465i0.2091d的每一列即為一個特征向量v=3.2037000000.568400000-0.1026+0.5388i00000-0.1026-0.5388i00000-0.0457V中非零值即為每一列特征向量對應(yīng)的特征值隨機生成5維列向量x第一組>>X=rand(1,5)'X=0.60200.26300.65410.68920.7482求X*X'>>X*X'ans=0
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 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. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 幼兒園小班音樂《大雨小雨》課件
- 西京學院《藝術(shù)鑒賞》2022-2023學年第一學期期末試卷
- 西京學院《市場營銷》2021-2022學年第一學期期末試卷
- 西京學院《跨境電子商務(wù)》2021-2022學年第一學期期末試卷
- 西京學院《機器人控制系統(tǒng)設(shè)計與仿真》2022-2023學年期末試卷
- 西京學院《版面設(shè)計》2021-2022學年第一學期期末試卷
- 西京學院《模擬電子技術(shù)實驗》2021-2022學年期末試卷
- 西華師范大學《小學音樂課程與教學》2022-2023學年第一學期期末試卷
- 西華師范大學《射頻電路理論與設(shè)計》2022-2023學年期末試卷
- 課文錢學森課件
- 中學生良好學習習慣養(yǎng)成教育課件
- 項目六-跨境電商營銷推廣課件
- 漢語普通話前后鼻音區(qū)分考試題庫(200題版)
- 小學英語四年級家長會ppt
- 四年級上冊語文老師家長會
- 2022幼兒園感恩節(jié)活動主題班會PPT感恩節(jié)課件
- 微波通信原理-課件
- 12-14mm帶壓開孔器操作說明書
- 胸水、腹水、腦脊液常規(guī)及生化檢查課件
- 腎綜合征出血熱培訓課件1
- 10分鐘造就“德國最愚蠢的銀行”解析課件
評論
0/150
提交評論