matlab如何将一组数代入原方程的字母里?syms x1 x2 x3 x4 y1 y2 y3 y4 X1 X2 X3 X4 Y1 Y2 Y3 Y4A=[x1,y1,1,0,0,0,-x1*X1,-y1*X1;0,0,0,x1,y1,1,-x1*Y1,-y1*Y1;x2,y2,1,0,0,0,...-x2*X2,-y2*X2;0,0,0,x2,y2,1,-x2*Y2,-y2*Y2;x3,y3,1,0,0,0,-x3*X3,-y3*X3;
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/06 00:30:53
matlab如何将一组数代入原方程的字母里?syms x1 x2 x3 x4 y1 y2 y3 y4 X1 X2 X3 X4 Y1 Y2 Y3 Y4A=[x1,y1,1,0,0,0,-x1*X1,-y1*X1;0,0,0,x1,y1,1,-x1*Y1,-y1*Y1;x2,y2,1,0,0,0,...-x2*X2,-y2*X2;0,0,0,x2,y2,1,-x2*Y2,-y2*Y2;x3,y3,1,0,0,0,-x3*X3,-y3*X3;
matlab如何将一组数代入原方程的字母里?
syms x1 x2 x3 x4 y1 y2 y3 y4 X1 X2 X3 X4 Y1 Y2 Y3 Y4
A=[x1,y1,1,0,0,0,-x1*X1,-y1*X1;0,0,0,x1,y1,1,-x1*Y1,-y1*Y1;x2,y2,1,0,0,0,...
-x2*X2,-y2*X2;0,0,0,x2,y2,1,-x2*Y2,-y2*Y2;x3,y3,1,0,0,0,-x3*X3,-y3*X3;0,0,0,...
x3,y3,1,-x3*Y3,-y3*Y3;x4,y4,1,0,0,0,-4*X4,-y4*X4;0,0,0,x4,y4,1,-x4*Y4,-y4*Y4]
b=[X1,Y1,X2,Y2,X3,Y3,X4,Y4]'
h=A\b
令x1=10 x2=20.Y3=3 Y4=4,然后解得代数后的h,要怎么编?
matlab如何将一组数代入原方程的字母里?syms x1 x2 x3 x4 y1 y2 y3 y4 X1 X2 X3 X4 Y1 Y2 Y3 Y4A=[x1,y1,1,0,0,0,-x1*X1,-y1*X1;0,0,0,x1,y1,1,-x1*Y1,-y1*Y1;x2,y2,1,0,0,0,...-x2*X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