Singular problem for bvp4c
이전 댓글 표시
Hi All,
I encounter some singular problems regarding bvp4c, please see my code for my equations and implementation. I know that when x = -1 and 1, my derivative goes to infinity. And it seems like that MATLAB complaints about this. I wonder is there any workaround for this problem? I tried on ode113, and instead of evaluating my initial point at x = -1, I just do it at x = -1 + 1e-7 to avoid this singular points. And it is solvable. I would like to use bvp4c because I have other equations and boundary condition to coupled together. I wonder is there similar strategy for bvp4c? Here are my code
solinit = bvpinit(linspace(-1,1,50),0);
sol = bvp4c(@height_ode,@height_bc,solinit);
y = deval(sol,linspace(-1,1,50));
plot(linspace(-1,1,50),y(1,:))
and defintion for height_ode and height_bc are following:
function dhdx = height_ode(x,h)
w = 0.7;
q = 1/2*w*(1-x^2);
dqdx = -w*x;
kappa = 1.469;
dhdx = (560*h(1)^0.5*q - 64*h(1).^4 + 6*w.^(7/8)*(72*kappa - 77)*h(1)*q*dqdx)/(3*w.^(7/8)*(96*kappa - 77)*q.^2);
end
function res = height_bc(yleft, yright)
res = [yleft];
댓글 수: 3
Torsten
2017년 7월 20일
And for bvp4c, the solution to integrate between [-1+eps:1-eps] does not work ?
Best wishes
Torsten.
Zhekai Deng
2017년 7월 20일
Zhekai Deng
2017년 7월 20일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Boundary Value Problems에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!