求高手解答用Matlab 如何在matlab编程求这个方程组的解啊?已知a,b,c方程组72.8*(1+cos(a))=2*(SQRT(x*21.8)+SQRT(25.5*y)+SQRT(25.5*z))50.8*(1+cos(b))=2*SQRT(x*50.8)48*(1+cos(c))=2*(SQRT(x*29)+SQRT(47*y)+SQRT(1.92*z))求x,y,z假设

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/05 16:37:23

求高手解答用Matlab 如何在matlab编程求这个方程组的解啊?已知a,b,c方程组72.8*(1+cos(a))=2*(SQRT(x*21.8)+SQRT(25.5*y)+SQRT(25.5*z))50.8*(1+cos(b))=2*SQRT(x*50.8)48*(1+cos(c))=2*(SQRT(x*29)+SQRT(47*y)+SQRT(1.92*z))求x,y,z假设
求高手解答用Matlab
如何在matlab编程求这个方程组的解啊?
已知a,b,c
方程组72.8*(1+cos(a))=2*(SQRT(x*21.8)+SQRT(25.5*y)+SQRT(25.5*z))
50.8*(1+cos(b))=2*SQRT(x*50.8)
48*(1+cos(c))=2*(SQRT(x*29)+SQRT(47*y)+SQRT(1.92*z))
求x,y,z
假设a=77.b=33.c=48.怎么在matlab输入才能等到x,

求高手解答用Matlab 如何在matlab编程求这个方程组的解啊?已知a,b,c方程组72.8*(1+cos(a))=2*(SQRT(x*21.8)+SQRT(25.5*y)+SQRT(25.5*z))50.8*(1+cos(b))=2*SQRT(x*50.8)48*(1+cos(c))=2*(SQRT(x*29)+SQRT(47*y)+SQRT(1.92*z))求x,y,z假设
syms x y z a b c
[x,y,z]=solve('72.8*(1+cos(a))=2*(sqrt(x*21.8)+sqrt(25.5*y)+sqrt(25.5*z))','50.8*(1+cos(b))=2*sqrt(x*50.8)','48*(1+cos(c))=2*(sqrt(x*29)+sqrt(47*y)+sqrt(1.92*z))','x,y,z')
x =
12.700000000000000000000000000000+25.400000000000000000000000000000*cos(b)+12.700000000000000000000000000000*cos(b)^2
y =
-.98416931170728906540241988580218*cos(c)+9.7643439805890752790240685157559*cos(a)*cos(b)-23.462398366292790782350185322144*cos(c)*cos(b)+7.1488996766620738069752563394849*cos(b)^2+3.3341639162497969191291895638814*cos(a)^2+.40958164398297044880227538559881*cos(a)+.59974496762043211062439587258181*cos(b)-16.023090169105698668480172257920*cos(c)*cos(a)+19.250659611845600192713968847131*cos(c)^2+.12578649948056747012125686189223e-1
z =
.15194565438596826916006412565125e-193*(.58477278352492431981436322974990e98+.58477278352492431981436322974990e98*cos(a)-.26731041191058757560106827855831e98*((cos(b)+1.)^2)^(1/2)-1.*(-.64771139107889760381210034820223e194*cos(c)+.64262081202967154457022801098613e195*cos(a)*cos(b)-.15441309237244940736312726425476e196*cos(c)*cos(b)+.47049056490306928474554525841306e195*cos(b)^2+.21943134403702282352778341593461e195*cos(a)^2+.82783874266682206962299704487537e192+.26955798481907364090410143645319e194*cos(a)+.39471018111316040430045885264655e194*cos(b)-.10545277016218098275353846992100e196*cos(c)*cos(a)+.12669437431192070703927236534687e196*cos(c)^2)^(1/2))^2
______________________________
就是代入求值就行了,例如:(接着上面的求X)
x=subs(x,{a,b,c},{77.7,33.3,48.5})
x =
127/10+127/5*cos(333/10)+127/10*cos(333/10)^2
__________________________________
其实在一开始就给定a,b,c的值也是可以的,如果不要求一定要求解析解的话,楼下说的fsolve倒也是一种选择

用fsolve函数可以解出数值解

丛叶SW 正解