フィルターのクリア

How to Supply the Jacobian to Fsolve?

26 ビュー (過去 30 日間)
Pablo
Pablo 2014 年 11 月 18 日
回答済み: Alan Weiss 2014 年 11 月 18 日
pow=fsolve(@eqns,pop);
This is the code I am using to solve a 2x2 non-linear system of equations, defined in the function eqns.m.
pop is a 2x1 initialisation vector pretty close to the solution. When I run it, the output says
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>
Any way out? I tried moving the initial point further away from the solution intentionally, still it is not working. How do I set the tolerance or some other parameter? Some posts gave me the impression that supplying the jacobian to matlab can be helpful, but how do I do that? Please note that I need the solution in the form of a code which I can put in a function file to be called repeatedly. I believe the interactive optimtool toolbox would not help here. Any help please?

回答 (1 件)

Alan Weiss
Alan Weiss 2014 年 11 月 18 日
Here is an example of a nonlinear equation being solved with its Jacobian.
If you want or need to use symbolic math to calculate the Jacobian, see this example.
Alan Weiss
MATLAB mathematical toolbox documentation

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by