Fix step bvp4c
显示 更早的评论
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 个)
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
2015-11-13
0 个投票
1 个评论
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.
类别
在 帮助中心 和 File Exchange 中查找有关 Mathematics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!