MATLAB 求教大神【急】
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/18 10:29:20
MATLAB 求教大神【急】
MATLAB 求教大神【急】
MATLAB 求教大神【急】
clc;clear
f1=@(x)[x(1)-0.6*sin(x(1))-0.3*cos(x(2)),x(2)-0.6*cos(x(1))-0.3*sin(x(2))];
f2=@(x)[x(1)^2-x(2)^2+x(3)-9,3*x(1)+5*x(2)+6*x(3),x(1)-3*x(2)-6*x(3)-1];
x=fsolve(f1,[0,0])
x2=fsolve(f2,[-1,1,-1])
结果:
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the default value of the function tolerance, and
the problem appears regular as measured by the gradient.
<stopping criteria details>
x =
0.530020372384399 0.714176726861242
No solution found.
fsolve stopped because the last step was ineffective. However, the vector of function
values is not near zero, as measured by the default value of the function tolerance.
<stopping criteria details>
x2 =
-2.608712719160109 1.012689586368029 -0.275128610149972
>>
方程组2没找到合适解,请确定合适初始点,我没好的建议,自己看看吧