Hello
How do I fix step size at bvp4c when I solve my problem.
I want to show a specific point value and the step mesh is auto and I can't enter specific number of mesh because I don't know number of mesh
[Merged from continuation question]
Answer about bvp4c fix step at runtime.
We have only specific point at the my domain for example my domain is [0, 0.1, 0.2, 0.3,0.4] When solver bvp4c solve my equation the domain have not just 5 mesh and maybe have 5 maybe have more than 5 mesh and when I want understand number of all mesh I must use function length(x) then length is variable some time is 5 point some time is more than 5 point and when I want value variable at X=0.2 I can't understand number of mesh because the mesh is auto maybe the number mesh 3 is X=O.2 or maybe another number mesh is X=0.2.
How do i fix step mesh at timerun.?forexample I wanThank you But the answer is not for me. We have only specific point at the my domain for example my domain is [0, 0.1, 0.2, 0.3,0.4] When solver bvp4c solve my equation the domain have not just 5 mesh and maybe have 5 maybe have mor than 5 mesh and when I want understand number of all mesh I must use function length(x) then length is variable some time is 5 point some time is mor than 5 point and when I want value variable at X=0.2 I can't understand number of mesh because the mesh is auto maybe the number mesh 3 is X=O.2 or maybe another number mesh is X=0.2.
How do i fix step at timerun.? for example I specific 5 point and I want show function length (x) just 5 mesh and not more than 5 point and I want 5 mesh and not more than 5 (just 5)

답변 (2개)

Torsten
Torsten 2015년 11월 13일
편집: Torsten 2015년 11월 13일

1 개 추천

From the documentation of bvp4c:
Use the function deval and the output sol of bvp4c to evaluate the solution at specific points xint in the interval [a,b].
sxint = deval(sol,xint)
Best wishes
Torsten.
Mostafa Mostafa
Mostafa Mostafa 2015년 11월 13일

0 개 추천

Thank you But the answer is not for me. We have only specific point at the my domain for example my domain is [0, 0.1, 0.2, 0.3,0.4] When solver bvp4c solve my equation the domain have not just 5 mesh and maybe have 5 maybe have mor than 5 mesh and when I want understand number of all mesh I must use function length(x) then length is variable some time is 5 point some time is mor than 5 point and when I want value variable at X=0.2 I can't understand number of mesh because the mesh is auto maybe the number mesh 3 is X=O.2 or maybe another number mesh is X=0.2.
How do i fix step at timerun.?I want specific forexample 5 point and I want 5 mesh and not more than 5

댓글 수: 1

Torsten
Torsten 2015년 11월 13일
You can't limit the mesh bvp4c uses. But you can interpolate the values from your mesh to the mesh of bvp4c by using MATLAB's interp1.
Best wishes
Torsten.

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

카테고리

태그

질문:

2015년 11월 13일

편집:

2015년 11월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by