function TwoPBVdemo()
hh=findobj(gcbf,'Tag','h');
hstring=get(hh,'String');
h=eval(hstring);
p=0:h:1;
x=p;
n=length(p);
t=[1:n-1;2:n];
e=[1 n];
hc=findobj(gcbf,'Tag','c');
hd=findobj(gcbf,'Tag','d');
hr=findobj(gcbf,'Tag','r');
hf=findobj(gcbf,'Tag','f');
hb=findobj(gcbf,'Tag','b');
hg=findobj(gcbf,'Tag','g');
hdelta=findobj(gcbf,'Tag','delta');
c=get(hc,'String');
d=get(hd,'String');
r=get(hr,'String');
f=get(hf,'String');
b=get(hb,'String');
g=get(hg,'String');
deltastring=get(hdelta,'String');
cx=eval(c).*ones(1,n);
dx=eval(d).*ones(1,n);
rx=eval(r).*ones(1,n);
fx=eval(f).*ones(1,n);
bx=eval(b).*ones(1,n);
gx=eval(g).*ones(1,n);
deltax=eval(deltastring).*ones(1,n);
A=zeros(n, n);
B=zeros(n, 1);
for i=1:n-1
   c=(cx(i)+cx(i+1))/2;
   d=(dx(i)+dx(i+1))/2;
   r=(rx(i)+rx(i+1))/2;
   f=(fx(i)+fx(i+1))/2;
   delta=(deltax(i)+deltax(i+1))/2;
   A(i,i)     = A(i,i)     + c*(-1/h)*(.5+delta*(-1/h))*h + d*(-1/h)*(-1/h)*h + r*.5*(.5+delta*(-1/h))*h;
   A(i,i+1)   = A(i,i+1)   + c*( 1/h)*(.5+delta*(-1/h))*h + d*( 1/h)*(-1/h)*h + r*.5*(.5+delta*(-1/h))*h;
   A(i+1,i)   = A(i+1,i)   + c*(-1/h)*(.5+delta*( 1/h))*h + d*(-1/h)*( 1/h)*h + r*.5*(.5+delta*(-1/h))*h;
   A(i+1,i+1) = A(i+1,i+1) + c*( 1/h)*(.5+delta*( 1/h))*h + d*( 1/h)*( 1/h)*h + r*.5*(.5+delta*(-1/h))*h;
   B(i)   = B(i)   + f*.5*h + f*delta*(-1/h);;
   B(i+1) = B(i+1) + f*.5*h + f*delta*( 1/h);
end
A0=A;
A0(1,1)=A0(1,1)+bx(1);
A0(n,n)=A0(n,n)+bx(n);

if 0
   for i=1:n-2
     A(i,i+1)=A(i,i+1)-dx(i+1)*deltax(i+1)*(-2/h)*(-1/h)/2;
   end
   for i=2:n
     A(i,i-1)=A(i,i-1)-dx(i-1)*deltax(i-1)*(-2/h)*( 1/h)/2;
   end
   for i=1:n-3
     A(i,i+2)=A(i,i+2)-dx(i+1)*deltax(i+1)*( 1/h)*(-1/h)/2;
   end
   for i=3:n
     A(i,i-2)=A(i,i-2)-dx(i-1)*deltax(i-1)*( 1/h)*( 1/h)/2;
   end
end

A(1,1)=A(1,1)+bx(1);
A(n,n)=A(n,n)+bx(n);
B(1)=B(1)+bx(1)*gx(1);
B(n)=B(n)+bx(n)*gx(n);
u=A\B;
u0=A0\B;
if h==0.01
   color='g';
else
   color='b';
end
plot(x,u0,color)
xlabel('x')
ylabel('u(x)')
title('c Du - D(d Du) + r u = f, n.Du = b (g - u)')
if h==0.01
   hold off
   set(hh,'String',get(hh,'UserData'))
   set(hdelta,'String',get(hdelta,'UserData'))
   return
else
   set(hh,'UserData',hstring)
   set(hdelta,'UserData',deltastring)
   set(hh,'String','0.01')
   set(hdelta,'String','0')
   hold on
   TwoPBVdemo_adm
end



   