Using "bvp4c" to solve 2nd order DE?
조회 수: 1 (최근 30일)
이전 댓글 표시
I was told that using a template and changing a few things would provide me with an answer to a 2nd order DE, using bvp4c. But I'm not sure how. I changed my low and high boundaries
function bvp4c
xlow = 0; xhigh = 10;
solinit = bvpinit(linspace(xlow,xhigh,10),[1 -1]);
sol = bvp4c(bvp4ode,bvp4bc,solinit);
xint = linspace(xlow,xhihg,20);
sxint = deval(sol,xint);
plot(xint,sxint(1,:))
function dydx = bvp4ode(x,y)
dydx = [y(2) y(1)];
function res = bvp4bc(ya,yb)
res = [ya(1) yb(1)]; % I think this is another area of concern.
Here is the initial data given: d^2T/dx^2 - 0.15T = 0 T(0) = 240 T(10) = 150
This is a bit confusing!!
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Boundary Value Problems에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!