如何利用excel或者matlab解比较复杂的三元一次方程组
如题方程组,我用solve解出来结果是错的。有谁能帮忙?symsxynams=solve('x=x*exp(-0.4)+20*exp(-0.2)*(2*sinh(0.2*...
如题方程组,我用solve解出来结果是错的。有谁能帮忙?
syms x y nam
s=solve('x=x*exp(-0.4)+20*exp(-0.2)*(2*sinh(0.2*y)-sinh(0.2))','y=0.5+2*(0.5-x)','nam=exp(-0.4)-2*2*20*exp(-0.2)*cosh(0.2*y)')
算出来nam=z应该为-0.653 展开
syms x y nam
s=solve('x=x*exp(-0.4)+20*exp(-0.2)*(2*sinh(0.2*y)-sinh(0.2))','y=0.5+2*(0.5-x)','nam=exp(-0.4)-2*2*20*exp(-0.2)*cosh(0.2*y)')
算出来nam=z应该为-0.653 展开
展开全部
syms x y z
ex1 = exp(-0.4)+20*exp(-0.2)*(2*sinh(0.2*y)-sinh(0.2))-x;
ex2 = 0.5+2*(0.5-x)-y;
ex3 = exp(-0.4)-80*exp(-0.2)*cosh(0.2*y)-z;
[x,y,z] = solve(ex1,ex2,ex3,'x,y,z');
x = double(x)
y = double(y)
z = double(z)
% 验证
subs(ex1)<=eps
subs(ex2)<=eps
subs(ex3)<=eps
x =
0.5109
y =
0.4783
z =
-65.1280
ans =
1
ans =
1
ans =
1
更多追问追答
追问
为什么用我上面那种编程和你的差距这么大啊,x=0.48657
追答
% 你是对的,我的 ex1 少了一个 x
% ex1 = exp(-0.4)+20*exp(-0.2)*(2*sinh(0.2*y)-sinh(0.2))-x;
ex1 = x*exp(-0.4)+20*exp(-0.2)*(2*sinh(0.2*y)-sinh(0.2))-x;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询