clear all

global n eta lambda

lambda=2;
n=0.05;
kappa=2;

eta=lambda^2/n/kappa^2;

xc = 1;
xinit = [0, 0.25, 0.5, 0.75, xc, xc, 1.25, 1.5, 1.75, 2];
yinit = [1;1];
%solinit = bvpinit(xinit,yinit);

solinit = bvpinit(xinit,@yinitfcn)

sol = bvp4c(@f,@bc,solinit);


plot(sol.x,sol.y(1,:),sol.x,sol.y(2,:),'--')
legend('v(x)','C(x)')
title('A three-point BVP solved with BVP4C')
xlabel(['\lambda = ',num2str(lambda), ...
        ', \kappa = ',num2str(eta),'.'])
ylabel('v and C') 