MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [求助]solve 解方程 (https://www.labfans.com/bbs/showthread.php?t=1339)

apal0069 2008-01-29 09:53

[求助]solve 解方程
 
>> syms x y
>> [x,y]=solve('((83.996-36.8899)^2+(18.7843+8)^2)^(1/2)+1.46*((36.8899-y)^2+(18.7843-x)^2)^(1/2)+((x+5)^2+y^2)^(1/2)-94.8472=0','(36.8899-y)/(18.7843-x)=-0.4415')
Warning: Explicit solution could not be found.
> In solve at 140

x =

[ empty sym ]



y =

[]
这个方程不知道出了什么问题 解不出来 跟这个一样形式的另一个就可以解出来

>> [xp,yp]=solve('((18.6187-5)^2+25.1147^2)^(1/2)+1.46*((xp-18.6187)^2+(yp-25.1147)^2)^(1/2)+((xp+8)^2+(83.996-yp)^2)^(1/2)-99.9514=0','(yp-25.1147)/(xp-18.6187)=71.1245')

xp =

18.784257794722172524887546392801
18.578567045455494242866590180400



yp =

36.889915370717159746364293414787
22.260263674499300276764793285895

很奇怪啊 为什么呢?

admin 2008-02-01 00:17

先用clc;clear;清理一下
syms x y
[x,y]=solve('((83.996-36.8899)^2+(18.7843+8)^2)^(1/2)+1.46*((36.8899-y)^2+(18.7843-x)^2)^(1/2)+((x+5)^2+y^2)^(1/2)-94.8472=0','(36.8899-y)/(18.7843-x)=-0.4415')

x =

16.927895854816549501563137484516


y =

37.709502430098493395059874800586

davidqu 2008-02-14 21:09

试试这个
 
其中的一个原因,可能是机器本身的原因,就像你上面的那个帖子,我发的,但是我今天解出来了,呵呵:
clear all
然后把解方程重新执行一次
如果还是同样的结果,就重复上面的步骤,我有时候要重复执行3-4次才出结果
试试吧。:smile:

liu378911449 2008-06-08 11:15

[B][COLOR="Red"]为什么我用这种方法解出来的结果是-Inf呢??[/COLOR][/B]
[COLOR="Blue"][B]solve('-9.8*(x^2)*log(1-(20*2.9575*pi*8)/(9.8*x))/(2.9575^2*(pi*8)^2)-(20*x)/(2.9575*pi*8)=500')[/B][/COLOR]

liu378911449 2008-06-08 11:15

[B][COLOR="Red"]为什么我用这种方法解出来的结果是-Inf呢??[/COLOR][/B]
[COLOR="Blue"][B]solve('-9.8*(x^2)*log(1-(20*2.9575*pi*8)/(9.8*x))/(2.9575^2*(pi*8)^2)-(20*x)/(2.9575*pi*8)=500')[/B][/COLOR]


所有时间均为北京时间。现在的时间是 03:18

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