资源描述:
《几何与代数实验报告.doc》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、10-11-2《几何与代数》数学实验报告学号:06010329姓名:周志浩得分:.实验一:平板的稳态温度分布问题(线性方程组应用)在热传导的研究中,一个重要的问题是确定一块平板的稳态温度分布。假定下图中的平板代表一条金属梁的截面,并忽略垂直于该截面方向上的热传导。已知平板内部有9个节点,每个节点的温度近似等于与它相邻的四个节点温度的平均值,例如,;为避免出现分数,可写成。设4条边界上的温度分别等于每位同学学号的后四位的4倍,例如学号为16308209的同学计算时,选择、、、。求:(1)建立可以确定平板内节点温度的线性方程组;(2)用MATLAB软件的三种方法
2、求解该线性方程组(请输出精确解(分数形式));方法一:利用Cramer法则求解;方法二:作为逆矩阵的方法求解;方法三:利用Gauss消元法即通过初等行变换求解。实验部分构造的线性方程:方法一:Cramer法则>>formatrat>>a1=[4,-1,0,-1,0,0,0,0,0,]';a2=[-1,4,-1,0,-1,0,0,0,0]';a3=[0,-1,4,0,0,-1,0,0,0]';a4=[-1,0,0,4,-1,0,-1,0,0]';a5=[0,-1,0,-1,4,-1,0,-1,0]';a6=[0,0,-1,0,-1,4,0,0,-1]';a7=
3、[0,0,0,-1,0,0,4,-1,0]';a8=[0,0,0,0,-1,0,-1,4,-1]';a9=[0,0,0,0,0,-1,0,-1,4]';b=[12,0,4,12,0,4,24,12,16]';>>D=det([a1,a2,a3,a4,a5,a6,a7,a8,a9]),D=100352>>D1=det([b,a2,a3,a4,a5,a6,a7,a8,a9]),D2=det([a1,b,a3,a4,a5,a6,a7,a8,a9]),D3=det([a1,a2,b,a4,a5,a6,a7,a8,a9]),D4=det([a1,a2,a3,b,a5,
4、a6,a7,a8,a9]),D5=det([a1,a2,a3,a4,b,a6,a7,a8,a9]),D6=det([a1,a2,a3,a4,a5,b,a7,a8,a9]),D7=det([a1,a2,a3,a4,a5,a6,b,a8,a9]),D8=det([a1,a2,a3,a4,a5,a6,a7,b,a9]),D9=det([a1,a2,a3,a4,a5,a6,a7,a8,b]),D1=630784D2=419328D3=344064D4=899584D5=702464D6=555520D7=1060864D8=935424D9=774144>>T1=D
5、1/D,T2=D2/D,T3=D3/D,T4=D4/D,T5=D5/D,T6=D6/D,T7=D7/D,T8=D8/D,T9=D9/DT1=44/7T2=117/28T3=24/7T4=251/28T5=7T6=155/28T7=74/7T8=261/28T9=54/7方法二:逆矩阵>>a1=[4,-1,0,-1,0,0,0,0,0,]';a2=[-1,4,-1,0,-1,0,0,0,0]';a3=[0,-1,4,0,0,-1,0,0,0]';a4=[-1,0,0,4,-1,0,-1,0,0]';a5=[0,-1,0,-1,4,-1,0,-1,0]';a6=
6、[0,0,-1,0,-1,4,0,0,-1]';a7=[0,0,0,-1,0,0,4,-1,0]';a8=[0,0,0,0,-1,0,-1,4,-1]';a9=[0,0,0,0,0,-1,0,-1,4]';b=[12,0,4,12,0,4,24,12,16]';>>A=[a1,a2,a3,a4,a5,a6,a7,a8,a9],B=[12,0,4,12,0,4,24,12,16]',A=Columns1through54-10-10-14-10-10-1400-1004-10-10-1400-10-1000-100000-100000Columns6throu
7、gh900000000-10000-100-10-10400-104-100-14-1-10-14B=12041204241216>>T=inv(A)*BT=44/7117/2824/7251/287155/2874/7261/2854/7方法三:Gauss消元法>>a1=[4,-1,0,-1,0,0,0,0,0,]';a2=[-1,4,-1,0,-1,0,0,0,0]';a3=[0,-1,4,0,0,-1,0,0,0]';a4=[-1,0,0,4,-1,0,-1,0,0]';a5=[0,-1,0,-1,4,-1,0,-1,0]';a6=[0,0,-1,0,
8、-1,4,0,0,-1]';a7=[0,0,0,-1