matlab解方程组,作图时明明有交点,解出来却是虚数??

2024-12-16 19:06:40
推荐回答(1个)
回答1:

求出虚数解了

还是用fsolve吧

clear all
clc
f=@(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)]);
[x y]=fsolve(f,[0 0])