Fsolve convergence when the variables are changing of the order of 1e-3 or less

조회 수: 2 (최근 30일)
UNK
UNK 2016년 12월 13일
편집: Matt J 2016년 12월 18일
I am interested in using fsolve to get the initial guess which satisfies a boundary condition in a Boundary Value Problem(BVP). The issue I am currently facing is let u0 = [4.31952;-3.75572;15.99999] be the starting guess in fsolve.
The solution would be something of this kind u1 = [4.31952+1e-5;-3.75572+1e-5;15.99999+1e-5]. Fsolve says no solution found, I tried to change the TolX and TolFun but had no success.
I am looking for a way to solve this issue, I tried scaling u0*1e2 still I don't obtain any convergence. I know should be an easy way to deal with these problems. Looking for some help.
  댓글 수: 2
Matt J
Matt J 2016년 12월 13일
편집: Matt J 2016년 12월 13일
Do you get the correct solution when you initialize with u1? If not, then your solution isn't near u1 as you expect. Either way, why initialize so far away with u0? u0*1e2 is even farther away, so why do you expect better?
UNK
UNK 2016년 12월 14일
I don't get solution when I start with u1. This is a close guess than starting with some random vector. When I give a random vector I mostly don't get any solution.
I am providing analytical Jacobian still it says
fsolve stopped because the relative size of the current step is less than the
selected value of the step size tolerance, but the vector of function values
is not near zero as measured by the selected value of the function tolerance.
In the later part I meant I am scaling the function which needs to approach zero by 1e2, so that the solver will be able to be more sensitive.

댓글을 달려면 로그인하십시오.

답변 (1개)

Matt J
Matt J 2016년 12월 18일
편집: Matt J 2016년 12월 18일
I don't get solution when I start with u1.
If you cannot get to the solution from u1, which is supposedly very close to the solution, it is likely that there is no solution near u1 as you expect. This might be due to some implementation error that you have made in the objective function, i.e, you are not implementing the equations that you intend to.

카테고리

Help CenterFile Exchange에서 Solver 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