MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [MATLAB数学相关] matlab!!!坑爹的BUG啊!! (https://www.labfans.com/bbs/showthread.php?t=13440)

killer9090 2011-05-19 09:58

matlab!!!坑爹的BUG啊!!
 
下面两个小程序唯一不同的地方就是符号变量x和y变成了p和o,其他的地方完全相同,但是得出的矩阵竟然顺序上差别这么大,导致后面的运算出现了很大的偏差,小弟在这里向高手请教,这是何解~~~~???
(1)syms x y ;
eq1=(x-5*sqrt(3))^2+(y-5)^2-4;
eq2=(sqrt(3)/3)*x-y;
[x,y]=solve(eq1,eq2);
d=eval(x)
e=eval(y)

d =

6.9282
10.3923


e =

4
6

(2)syms p o ;
eq1=(p-5*sqrt(3))^2+(o-5)^2-4;
eq2=(sqrt(3)/3)*p-o;
[p,o]=solve(eq1,eq2);
d=eval(p)
e=eval(o)

d =

6
4


e =

10.3923
6.9282


所有时间均为北京时间。现在的时间是 12:50

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.