matlab解线性方程组
来源:学生作业帮 编辑:大师作文网作业帮 分类:数学作业 时间:2024/11/10 21:09:17
matlab解线性方程组
--------------------------------------------------------------------------------
A=[0 0 1 0 0 1 0 1 0 0 700;0 1 -1 1 0 0 0 0 0 0 300; 0 0 0 1 1 0 0 0 0 0 500;
0 0 0 0 0 -1 1 0 0 0 200;1 1 0 0 0 0 0 0 0 0 800; 1 0 0 0 1 0 0 0 0 0 800;
0 0 0 0 0 0 1 1 0 0 1000; 0 0 0 0 0 0 0 0 1 0 400;0 0 0 0 0 0 0 0 -1 1 200;
0 0 0 0 0 0 0 0 0 1 600];
matlab程序写
求解该线性方程组x1到x10的值;
--------------------------------------------------------------------------------
A=[0 0 1 0 0 1 0 1 0 0 700;0 1 -1 1 0 0 0 0 0 0 300; 0 0 0 1 1 0 0 0 0 0 500;
0 0 0 0 0 -1 1 0 0 0 200;1 1 0 0 0 0 0 0 0 0 800; 1 0 0 0 1 0 0 0 0 0 800;
0 0 0 0 0 0 1 1 0 0 1000; 0 0 0 0 0 0 0 0 1 0 400;0 0 0 0 0 0 0 0 -1 1 200;
0 0 0 0 0 0 0 0 0 1 600];
matlab程序写
求解该线性方程组x1到x10的值;
A=[0 0 1 0 0 1 0 1 0 0 700;0 1 -1 1 0 0 0 0 0 0 300; 0 0 0 1 1 0 0 0 0 0 500;
0 0 0 0 0 -1 1 0 0 0 200;1 1 0 0 0 0 0 0 0 0 800; 1 0 0 0 1 0 0 0 0 0 800;
0 0 0 0 0 0 1 1 0 0 1000; 0 0 0 0 0 0 0 0 1 0 400;0 0 0 0 0 0 0 0 -1 1 200;
0 0 0 0 0 0 0 0 0 1 600];
b=zeros(10,1);
A\b
得到
0
0
0
0
0
0
0
0
0
0
0
0 0 0 0 0 -1 1 0 0 0 200;1 1 0 0 0 0 0 0 0 0 800; 1 0 0 0 1 0 0 0 0 0 800;
0 0 0 0 0 0 1 1 0 0 1000; 0 0 0 0 0 0 0 0 1 0 400;0 0 0 0 0 0 0 0 -1 1 200;
0 0 0 0 0 0 0 0 0 1 600];
b=zeros(10,1);
A\b
得到
0
0
0
0
0
0
0
0
0
0
0