H'''' – 5(H*H''' + 4GG') = 0 ; G'' + 5(H'*G – H*G') = 0 With the boundary conditions: G(0) = 0.5, H(0) = 0, H'(0) = 0,G(1) = 1, H(1) = 0, H'(1) = 0
This is my code:
function bvp_code_matlab_1options = bvpset('stats','off', 'RelTol', 1e-6);solinit = bvpinit(linspace(0,4,5),[1,0]);sol = bvp4c (@OdeBVP, @OdeBC, solinit, options);plot (sol.x, sol.y(1,:));function f = OdeBVP(x,y)f=[ x(2); x(3); 20*y(1)*y(2)+5*(x(1)*x(3)); y(2); 5*(x(1)*y(2))- 5*(x(2)*y(1)); ];% Define Boundary conditions
function res = OdeBC (ya,yb)res = [ya(1)-0.5 yb(1)-1 xa(1) xb(1) xa(2) xb(2) ];
Could someone please tell me the errors I'm committing?
Best Answer