急!fsolve函数解方程关于初值和所解根的问题
当用fsolve这个函数解一个非线性方程时,出现了设定什么样的初始值就会得到什么样的解的情况,但这个解并不是我要解的方程组的解。 这种问题该怎么解决:
程序提示警告如下:
Warning: Default trust-region dogleg method of FSOLVE cannot
handle non-square systems; using Gauss-Newton method instead.
> In fsolve at 248
In bxx at 16
Optimization terminated: directional derivative along
search direction less than TolFun and infinity-norm of
gradient less than 10*(TolFun+TolX).
程序如下:
函数文件:
function F=myfunx(x)
global fr22 fr33 fr44 PP;
F=[x(1).*conj(x(1)).*(cos(x(3))).^4+x(2).*conj(x(2)).*(sin(x(3))).^4-2.*x(1).*x(2).*(sin(x(3))).^2.*(cos(x(3))).^2.*cos(pi-PP)-fr22.*conj(fr22);
x(1).*conj(x(1)).*(cos(x(3)+pi/18)).^4