BVP4c-display iterations while running

조회 수: 6 (최근 30일)
Mona
Mona 2011년 5월 27일
Hello,
I am using BVP4c to solve a boundary value problem. I get this error
??? Error using ==> bvp4c at 252 Unable to solve the collocation equations -- a singular Jacobian encountered So,I am trying to find out at each iteration the singularity occurs. Is there anyway to display the iterations in the command window? I will appreciate your help.
Many thanks,
Mona

답변 (1개)

Walter Roberson
Walter Roberson 2011년 5월 27일
Pass in a bvp option set with the Stats property set on; see here
You might also want to try setting the SingularTerm option there to see if that overcomes your singularity difficulty.
  댓글 수: 2
Mona
Mona 2011년 5월 27일
Walter,
Thanks.
I checked the Stats, but it works when you got the solution. But, in this case that I get the singularity warning, I can not see the Stats.
Do you have any other suggestion?
Walter Roberson
Walter Roberson 2011년 5월 27일
You could use a global variable in the function that you call; initialize it to 0 before-hand, and increment it by 1 and display the new value each time the function was called.

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

카테고리

Help CenterFile Exchange에서 Boundary Value Problems에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by