matlab 求方程组的解
已知方程组(x1-a)^2/(5/0.9)^2+(y1-b)^2/5^2=1Y1=((0.9^2)*(x1-a))/sqrt(5^2-(x1-a)^2*(0.9^2))x...
已知方程组
(x1-a)^2/(5/0.9)^2+(y1-b)^2/5^2=1
Y1=((0.9^2)*( x1-a))/sqrt(5^2-(x1-a)^2*(0.9^2))
x1,y1,Y1的值都是10维数组,且已知
请问在MATLAB里怎么解出a,b 的值(a,b解出的肯定也是10组解),是用fsolve吗? 怎么写啊 展开
(x1-a)^2/(5/0.9)^2+(y1-b)^2/5^2=1
Y1=((0.9^2)*( x1-a))/sqrt(5^2-(x1-a)^2*(0.9^2))
x1,y1,Y1的值都是10维数组,且已知
请问在MATLAB里怎么解出a,b 的值(a,b解出的肯定也是10组解),是用fsolve吗? 怎么写啊 展开
1个回答
展开全部
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倒也是一种选择
[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倒也是一种选择
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
东莞大凡
2024-11-14 广告
2024-11-14 广告
标定板认准大凡光学科技,专业生产研发厂家,专业从事光学影像测量仪,光学投影测量仪.光学三维测量仪,光学二维测量仪,光学二维测量仪,光学三维测量仪,光学二维测量仪.的研发生产销售。东莞市大凡光学科技有限公司创立于 2018 年,公司总部坐落于...
点击进入详情页
本回答由东莞大凡提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询