作业帮 > 综合 > 作业

matlab求解三元二次方程组

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/11/07 19:20:44
matlab求解三元二次方程组
x1=-226.11;
y1=238.802;
z1=-1577;
x2=223.1317;
y2=201.5533;
z2=-1577;
x3=-277.2719;
y3=-202.0605;
z3=-1577;
与求解方程组:
(t1*x1-t2*x2)^2+(t1*y1-t2*y2)^2+(t1*z1-t2*z2)^2=532.8689^2
(t1*x1-t3*x3)^2+(t1*y1-t3*y3)^2+(t1*z1-t3*z3)^2=532.8689^2
(t3*x3-t2*x2)^2+(t3*y3-t2*y2)^2+(t3*z3-t2*z2)^2=753.5904^2
从中解出t1,t2,t3
只需要解出近似解就可以了,solve解不出来的.
x1=-226.11;
y1=238.802;
z1=-1577;
x2=223.1317;
y2=201.5533;
z2=-1577;
x3=-277.2719;
y3=-202.0605;
z3=-1577;
syms t1 t2 t3
eq1=(t1*x1-t2*x2)^2+(t1*y1-t2*y2)^2+(t1*z1-t2*z2)^2-532.8689^2;
eq2=(t1*x1-t3*x3)^2+(t1*y1-t3*y3)^2+(t1*z1-t3*z3)^2-532.8689^2;
eq3=(t3*x3-t2*x2)^2+(t3*y3-t2*y2)^2+(t3*z3-t2*z2)^2-753.5904^2;
[t1 t2 t3]=solve(eq1,eq2,eq3,'t1','t2','t3')
楼主我用solve可以解出解来,你参考一下
再问: 能不能把结果发出来一下?可能我的机器不行。
再答: t1 = -1.0509173508545735104340338689947 -1.1698934808360810991826320184508 1.0509173508545735104340338689947 1.1698934808360810991826320184508 0.010396634113083991776989880165808*i - 1.2019462220480859491977964180343 - 0.010396634113083991776989880165808*i - 1.2019462220480859491977964180343 1.2019462220480859491977964180343 - 0.010396634113083991776989880165808*i 0.010396634113083991776989880165808*i + 1.2019462220480859491977964180343 t2 = -1.1697089782522916388945379925719 -1.1913186512726991219844892128139 1.1697089782522916388945379925719 1.1913186512726991219844892128139 0.057634634834530744446137087224216*i - 1.138347026247663883595166143394 - 0.057634634834530744446137087224216*i - 1.138347026247663883595166143394 1.138347026247663883595166143394 - 0.057634634834530744446137087224216*i 0.057634634834530744446137087224216*i + 1.138347026247663883595166143394 t3 = -1.174266184126665874532701817206 -1.0359709975279320067152227120205 1.174266184126665874532701817206 1.0359709975279320067152227120205 - 0.0089114677978635435253876332051359*i - 1.2032654076846048324649767119272 0.0089114677978635435253876332051359*i - 1.2032654076846048324649767119272 0.0089114677978635435253876332051359*i + 1.2032654076846048324649767119272 1.2032654076846048324649767119272 - 0.0089114677978635435253876332051359*i