matlab 求方程组的解

发布网友 发布时间:2022-03-25 19:55

我来回答

1个回答

热心网友 时间:2022-03-25 21:24

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倒也是一种选择
声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。
E-MAIL:11247931@qq.com