fujinhai 发表于 2009-3-19 21:44

解符号方程组的逗号问题

我用matlab解了一个方程组,解出的结果中含有逗号,看不懂什么意思,希望明白人能给出解答。
Syms x y t; =solve('-9*cos(x+y)-79.5*sin(x+y)+9*cos(y)-60*sin(y)=0','138+79.5*cos(x+y)+9*sin(y)-9*sin(x+y)+60*cos(y)=277.5-15*t')

结果:
x =

atan(-.59943021901762195934187288641764e-2*t^2+.11149402073727768443758835687368*t-.24984251528654483265369261905887-.89549288633170190915302013999596e-3*(-625.*t^4+23250.*t^3-268325.*t^2+969060.*t+77841.)^(1/2),.22387322158292547728825503499899e-1*t^2-.41640419214424138775615436509812*t+.93310358755763338933744698587579-.23977208760704878373674915456706e-3*(-625.*t^4+23250.*t^3-268325.*t^2+969060.*t+77841.)^(1/2))
atan(-.59943021901762195934187288641764e-2*t^2+.11149402073727768443758835687368*t-.24984251528654483265369261905887+.89549288633170190915302013999596e-3*(-625.*t^4+23250.*t^3-268325.*t^2+969060.*t+77841.)^(1/2),.22387322158292547728825503499899e-1*t^2-.41640419214424138775615436509812*t+.93310358755763338933744698587579+.23977208760704878373674915456706e-3*(-625.*t^4+23250.*t^3-268325.*t^2+969060.*t+77841.)^(1/2))



y =

atan(-1.6666666666666666666666666666667*(.11002444987775061124694376528117*t^2-2.0464547677261613691931540342298*t+8.1858190709046454767726161369193+.29339853300733496332518337408313e-1*(-625.*t^4+23250.*t^3-268325.*t^2+969060.*t+77841.)^(1/2))/(-93.+10.*t),(-1.2224938875305623471882640586797*t^2+22.738386308068459657701711491443*t-90.953545232273838630806845965770+.73349633251833740831295843520782e-2*(-625.*t^4+23250.*t^3-268325.*t^2+969060.*t+77841.)^(1/2))/(-93.+10.*t))
atan(-1.6666666666666666666666666666667*(.11002444987775061124694376528117*t^2-2.0464547677261613691931540342298*t+8.1858190709046454767726161369193-.29339853300733496332518337408313e-1*(-625.*t^4+23250.*t^3-268325.*t^2+969060.*t+77841.)^(1/2))/(-93.+10.*t),(-1.2224938875305623471882640586797*t^2+22.738386308068459657701711491443*t-90.953545232273838630806845965770-.73349633251833740831295843520782e-2*(-625.*t^4+23250.*t^3-268325.*t^2+969060.*t+77841.)^(1/2))/(-93.+10.*t))
里面的逗号我已用红字标出。

ChaChing 发表于 2009-3-19 22:32

symbol个人不熟, 猜测会不会就是atan2(a,b)的含意!?

fujinhai 发表于 2009-3-20 11:18

谢谢,应该会是这样吧,试一试。

hanihaoma 发表于 2009-3-20 22:15

解决了吗?解决了的话,还请分享一下。谢谢

fujinhai 发表于 2009-3-22 20:27

已解决。看来确实是这样。matlab中的结果是atan(x,y)时。我们再计算时应写成atan2(x,y)形式才正确。
页: [1]
查看完整版本: 解符号方程组的逗号问题