pow=fsolve(@eqns,pop);

这是我用来解决2x2非线性方程组的代码,在函数eqns.m中定义 .

pop是一个非常接近解决方案的2x1初始化向量 . 当我运行它时,输出说

No solution found.fsolve stopped because the relative size of the current step is less than the default value of the step size tolerance squared, but the vector of function values is not near zero as measured by the default value of the function tolerance.<stopping criteria details>

任何出路?我试图有意地将初始点远离解决方案,但仍无法正常工作 . 如何设置公差或其他参数?有些帖子给我的印象是,将jacobian提供给matlab可能会有所帮助,但我该怎么办呢?请注意,我需要以代码的形式提供解决方案,我可以将其放入函数文件中以便重复调用 . 我相信交互式optimtool工具箱在这里没有帮助 . 有什么帮助吗?

同样从文档中,fsolve可以使用三种不同的算法 . 对于某些问题结构,它们中的任何一个都比其他更有帮助吗?我在哪里可以对它们进行比较研究,适合一些非专家优化?