Matlab Solve(): Not giving all the solutions

只愿长相守 提交于 2019-12-02 15:16:45

问题


I am trying to find intersection points of two curves

syms x y
g(x) = 20*(exp(-(x+30)/3.5)-1);
[sol_x, sol_y] = solve((x+22.3097)^2+(y+16.2497)^2 == 25, y == g(x),x,y,'Real',true) ;

It is giving only one solution. But according to the plot of the two equations, there should be two intersection points. How can I rectify this problem?


回答1:


The solver can not find a analytic solution, thus a numeric solver is used. There is no reliable way in finding all solutions with a numeric method, but if you have a good guess (e.g. from a plot) try vpasolve with a reasonable set initial value. In this case, with a initial value of -50 I got another solution.



来源:https://stackoverflow.com/questions/24273413/matlab-solve-not-giving-all-the-solutions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!