版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
PAGEPAGE6數(shù)值實驗報告Ⅱ?qū)嶒灻Q三對角方程求解問題實驗時間2012姓名吳海洋班級數(shù)學(xué)10-1學(xué)號10072116成績一、實驗?zāi)康模瑑?nèi)容1.理解三對角方程的概念2.掌握三對角方程的解法,主要是追趕法二、算法描述追趕法的步驟及思想:三對角矩陣的追趕法分解實質(zhì)上也是基于對矩陣的LU分解,思想上大致是一致的,但三對角也有其很好的性質(zhì),其具體分解如下:=根據(jù)公式即可得到三對角矩陣LU分解的計算公式如下:方程組求解的計算公式為:以上便是三對角矩陣的追趕法分解以及求解過程。三.程序代碼三對角矩陣的追趕法:n=100;%n=500;%方程組的真解x0=ones(1,n);a1=-1*ones(1,n-1);a3=a1;a2=2*ones(1,n);b=zeros(1,n);b(1)=1;b(n)=1;%a1為對角下向量%a2為對角向量%a3為對角上向量%b為方程常數(shù)項r1=size(a1);m=r1(2);r2=size(a2);n=r2(2);ifsize(a1)~=size(a2)|m~=n-1|size(a2)~=size(b)error('變量不匹配,檢查變量輸入情況!');endp=ones(1,m);Y=ones(1,n);x=Y;p(1)=a1(1)/a2(1);Y(1)=b(1)/a2(1);t=0;fori=2:mt=a2(i)-a1(i-1)*p(i-1);p(i)=a3(i)/t;Y(i)=(b(i)-a1(i-1)*Y(i-1))/t;endY(n)=(b(n)-a1(n-1)*Y(n-1))/(a2(n)-a1(n-1)*p(n-1));x(n)=Y(n);fori=n-1:-1:1x(i)=Y(i)-p(i)*x(i+1);end%方程組的解為disp('方程組的解為')x%數(shù)值解與真值的誤差為disp('數(shù)值解與真值的誤差為:')c=norm(x-x0,2)四.數(shù)值結(jié)果方程組的解為:(1)n=100時x=Columns1through71.00001.00001.00001.00001.00001.00001.0000Columns8through141.00001.00001.00001.00001.00001.00001.0000Columns15through211.00001.00001.00001.00001.00001.00001.0000Columns22through281.00001.00001.00001.00001.00001.00001.0000Columns29through351.00001.00001.00001.00001.00001.00001.0000Columns36through421.00001.00001.00001.00001.00001.00001.0000Columns43through491.00001.00001.00001.00001.00001.00001.0000Columns50through561.00001.00001.00001.00001.00001.00001.0000Columns57through631.00001.00001.00001.00001.00001.00001.0000Columns64through701.00001.00001.00001.00001.00001.00001.0000Columns71through771.00001.00001.00001.00001.00001.00001.0000Columns78through841.00001.00001.00001.00001.00001.00001.0000Columns85through911.00001.00001.00001.00001.00001.00001.0000Columns92through981.00001.00001.00001.00001.00001.00001.0000Columns99through1001.00001.0000數(shù)值解與真值的誤差為:c=7.3995e-014(2)n=500時方程組的解為x=Columns1through71.00001.00001.00001.00001.00001.00001.0000Columns8through141.00001.00001.00001.00001.00001.00001.0000Columns15through211.00001.00001.00001.00001.00001.00001.0000Columns22through281.00001.00001.00001.00001.00001.00001.0000Columns29through351.00001.00001.00001.00001.00001.00001.0000Columns36through421.00001.00001.00001.00001.00001.00001.0000Columns43through491.00001.00001.00001.00001.00001.00001.0000Columns50through561.00001.00001.00001.00001.00001.00001.0000Columns57through631.00001.00001.00001.00001.00001.00001.0000Columns64through701.00001.00001.00001.00001.00001.00001.0000Columns71through771.00001.00001.00001.00001.00001.00001.0000Columns78through841.00001.00001.00001.00001.00001.00001.0000Columns85through911.00001.00001.00001.00001.00001.00001.0000Columns92through981.00001.00001.00001.00001.00001.00001.0000Columns99through1051.00001.00001.00001.00001.00001.00001.0000Columns106through1121.00001.00001.00001.00001.00001.00001.0000Columns113through1191.00001.00001.00001.00001.00001.00001.0000Columns120through1261.00001.00001.00001.00001.00001.00001.0000Columns127through1331.00001.00001.00001.00001.00001.00001.0000Columns134through1401.00001.00001.00001.00001.00001.00001.0000Columns141through1471.00001.00001.00001.00001.00001.00001.0000Columns148through1541.00001.00001.00001.00001.00001.00001.0000Columns155through1611.00001.00001.00001.00001.00001.00001.0000Columns162through1681.00001.00001.00001.00001.00001.00001.0000Columns169through1751.00001.00001.00001.00001.00001.00001.0000Columns176through1821.00001.00001.00001.00001.00001.00001.0000Columns183through1891.00001.00001.00001.00001.00001.00001.0000Columns190through1961.00001.00001.00001.00001.00001.00001.0000Columns197through2031.00001.00001.00001.00001.00001.00001.0000Columns204through2101.00001.00001.00001.00001.00001.00001.0000Columns211through2171.00001.00001.00001.00001.00001.00001.0000Columns218through2241.00001.00001.00001.00001.00001.00001.0000Columns225through2311.00001.00001.00001.00001.00001.00001.0000Columns232through2381.00001.00001.00001.00001.00001.00001.0000Columns239through2451.00001.00001.00001.00001.00001.00001.0000Columns246through2521.00001.00001.00001.00001.00001.00001.0000Columns253through2591.00001.00001.00001.00001.00001.00001.0000Columns260through2661.00001.00001.00001.00001.00001.00001.0000Columns267through2731.00001.00001.00001.00001.00001.00001.0000Columns274through2801.00001.00001.00001.00001.00001.00001.0000Columns281through2871.00001.00001.00001.00001.00001.00001.0000Columns288through2941.00001.00001.00001.00001.00001.00001.0000Columns295through3011.00001.00001.00001.00001.00001.00001.0000Columns302through3081.00001.00001.00001.00001.00001.00001.0000Columns309through3151.00001.00001.00001.00001.00001.00001.0000Columns316through3221.00001.00001.00001.00001.00001.00001.0000Columns323through3291.00001.00001.00001.00001.00001.00001.0000Columns330through3361.00001.00001.00001.00001.00001.00001.0000Columns337through3431.00001.00001.00001.00001.00001.00001.0000Columns344through3501.00001.00001.00001.00001.00001.00001.0000Columns351through3571.00001.00001.00001.00001.00001.00001.0000Columns358through3641.00001.00001.00001.00001.00001.00001.0000Columns365through3711.00001.00001.00001.00001.00001.00001.0000Columns372through3781.00001.00001.00001.00001.00001.00001.0000Columns379through3851.00001.00001.00001.00001.00001.00001.0000Columns386through3921.00001.00001.00001.00001.00001.00001.0000Columns393through3991.00001.00001.00001.00001.00001.00001.0000Columns400through4061.00001.00001.00001.00001.00001.00001.0000Columns407through4131.00001.00001.00001.00001.00001.00001.0000Columns414through4201.00001.00001.00001.00001.00001.00001.0000Columns421through4271.00001.00001.00001.00001.00001.00001.0000Columns428through4341.00001.00001.00001.00001.00001.00001.0000Columns435through4411.00001.00001.00001.00001.00001.00001.0000Columns442through4481.00001.00001.00001.00001.00001.00001.0000Columns449through4551.00001.00001.00001.00001.00001.00001.0000Columns456through4621.00001.00001.00001.00001.00001.00001.0000Columns4
溫馨提示
- 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)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 衛(wèi)生防疫與健康管理手冊(標(biāo)準版)
- 企業(yè)內(nèi)部審計程序與案例解析手冊
- 健身俱樂部運營與管理操作手冊
- 水利工程設(shè)計規(guī)范與標(biāo)準操作手冊
- 商務(wù)合同審查與風(fēng)險控制手冊(標(biāo)準版)
- 化工產(chǎn)品生產(chǎn)與儲存安全手冊
- 普及女性法律知識
- 企業(yè)成本控制與核算流程手冊(標(biāo)準版)
- 公共設(shè)施運維管理操作手冊(標(biāo)準版)
- 2026年共享辦公空間運營公司員工離職與辭退管理制度
- 融媒體考試試題及答案
- 孕婦監(jiān)護和管理課件
- 2026年安全員之A證考試題庫500道(必刷)
- 眼科疾病常見癥狀解析及護理指南
- 農(nóng)村水表改造施工方案
- 支持民辦教育發(fā)展增加教育多元化選擇
- 《2+N糖尿病逆轉(zhuǎn)治療行業(yè)規(guī)范與操作流程》
- 注射用伏欣奇拜單抗-臨床用藥解讀
- (正式版)DB21∕T 1565-2025 《預(yù)應(yīng)力混凝土管樁基礎(chǔ)技術(shù)規(guī)程》
- 壓裂裂縫檢測技術(shù)
- 防化兵課件教學(xué)課件
評論
0/150
提交評論