问题标题:
matlab解方程组,作图时明明有交点,解出来却是虚数??[x,y]=solve('(1.51872*sqrt((-150-x)^2+(100-y)^2)+sqrt((52627.5135-x)^2+(1000000-y)^2))^2-(1001375.9682)^2','tan(-0.6684)-(y-100)/(x+150)','x','y')一个椭圆与直线交点
问题描述:
matlab解方程组,作图时明明有交点,解出来却是虚数??[x,y]=solve('(1.51872*sqrt((-150-x)^2+(100-y)^2)+sqrt((52627.5135-x)^2+(1000000-y)^2))^2-(1001375.9682)^2','tan(-0.6684)-(y-100)/(x+150)','x','y')一个椭圆与直线交点。是不是方法用错了,求大侠解答。
蔡子亮回答:
求出虚数解了还是用fsolve吧clearallclcf=@(x)([1.51872*sqrt((-150-x(1))^2+(100-x(2))^2)+sqrt((52627.5135-x(1))^2+(1000000-x(2))^2)-1001375.9682;tan(-0.6684)-(x(2)-100)/(x(1)+150)]);[xy]=fsolve(f,[00])
点击显示
其它推荐