怎么用matlab解这个方程组先是三个方程F(x,y,z)=log(((x^2+y^2+(z-5)^2)^0.5)-y)

4个回答

  • 我帮你试了试,可以的

    function a=qiujie(p)

    x=p(1);

    y=p(2);

    z=p(3);

    a(1)=log(((x^2+y^2+(z-5)^2)^0.5)-y)-log(((x^2+y^2+(z-5)^2)^0.5)+y);

    a(2)=log(((y^2+x^2+(z-5)^2)^0.5)-x)-log(((y^2+x^2+(z-5)^2)^0.5)+x);

    a(3)=atan((x/y*(z-5)/(x^2+y^2+(z-5)^2)^0.5));

    clc;clear;

    options = optimset('Display','off','TolFun',1e-20,'MaxIter',20000,'MaxFunEvals',10000);

    t=fsolve('qiujie',[1,1,1],options)

    x=-0.000000000012715;

    y=2.227416301455072;

    z=-269012.6180821919;