用matlab解方程组的问题,五个方程求解四个未知数.方程:x+10496.108*y+10496.108^2*z+10496.108^3*t=-3043766.03 x+10500.275*y+10500.275^2*z+10500.275^3*t=-3042809.53x+10504.442*y+10504.442^2*z+10504.442^3*t=-3041787.84x+10508.609*y+10
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/13 04:11:35
用matlab解方程组的问题,五个方程求解四个未知数.方程:x+10496.108*y+10496.108^2*z+10496.108^3*t=-3043766.03 x+10500.275*y+10500.275^2*z+10500.275^3*t=-3042809.53x+10504.442*y+10504.442^2*z+10504.442^3*t=-3041787.84x+10508.609*y+10
用matlab解方程组的问题,五个方程求解四个未知数.
方程:x+10496.108*y+10496.108^2*z+10496.108^3*t=-3043766.03
x+10500.275*y+10500.275^2*z+10500.275^3*t=-3042809.53
x+10504.442*y+10504.442^2*z+10504.442^3*t=-3041787.84
x+10508.609*y+10508.609^2*z+10508.609^3*t=-3040701.05
x+10512.776*y+10512.776^2*z+10512.776^3*t=-3039549.25
用matlab解方程组的问题,五个方程求解四个未知数.方程:x+10496.108*y+10496.108^2*z+10496.108^3*t=-3043766.03 x+10500.275*y+10500.275^2*z+10500.275^3*t=-3042809.53x+10504.442*y+10504.442^2*z+10504.442^3*t=-3041787.84x+10508.609*y+10
方程数大于未知量个数,属于超定方程组,一般没有精确解,只能求最小二乘解.matlab中可以利用左除或伪逆法求解.
clear
c1=10496.108; c2=10500.275; c3=10504.442; c4=10508.609; c5=10512.776;
A=[1,c1,c1^2,c1^3; 1,c2,c2^2,c2^3; 1,c3,c3^2,c3^3; 1,c4,c4^2,c4^3; 1,c5,c5^2,c5^3;];
B=[-3043766.03 ;-3042809.53;-3041787.84;-3040701.05;-3039549.25];
xyzt=pinv(A)*B %伪逆法求解
%xyzt=A\B %左除法
xyzt =
1.0e+004 *
0.0005
1.8316
-0.0004
0.0000