From: Vamshi Yamsani on
Hi,
I am trying to solve 3 non-linear 1-Dimensional odes, which I have linearized to 6 odes with 6 variables and 6 boundary conditions (3 each on two boundaries)
I wrote the following file:

function testhome
global K1 K2 alphac meshh delta
K1 = 1.015393096999939e-08;
K2 = 2.180429609600968e+04;
alphac = 1;
meshh = 10^2;
delta = 51.686615886833515;
solinit = bvpinit(linspace(0,1,meshh), @yinit, options);
sol = bvp4c(@P1, @testbc, solinit);
end
----------------------------
function fprime = P1(x, y)
fprime = [y(2)
-K1*y(5)*y(1)*exp(alphac*y(3))-y(2)*y(4)-K2*y(1)^2
y(4)
-K2*y(1)
y(6)
delta*K1*y(5)*y(1)*exp(alphac*y(3)) ];

end
----------------------------
function res = testbc(ya,yb)
res = [ yb(1) - 1
ya(2)
yb(3) - 1
ya(4)
ya(5) - 1
yb(6) ];
end
---------------------------
function v = yinit(x)
v = [1
0
1
0
1
0];
end
------------
Now, I get the following error and I am just unable to figure it out. Could you please help me?