function prikladMKP1d()

% -(k(x)*u'(x))' = 10 + 2*Dirac(1), x z (0,1)
% u(0) = u(1) = 1
% % k(1)*u'(1) = 2

% MKP diskretizace
h = 0.02;
x = 0:h:1;
nvlnka = length(x);

% data ulohy
k = ones(1,nvlnka-1);
% k(find(x<=0.5)) = 0.1;
f = 10*ones(1,nvlnka-1);
uDirich = [1;10]; idxDirich = [1,nvlnka];
idxNonDirich = setdiff(1:nvlnka,idxDirich);
% tauNeum = 2; idxNeum = nvlnka;
tauNeum = []; idxNeum = [];

% MKP
[A,b] = mkp1d(x,k,f,idxNeum,tauNeum,idxDirich,uDirich);
uvlnka = zeros(nvlnka,1);
u = A\b;
uvlnka(idxNonDirich) = u;
uvlnka(idxDirich) = uDirich;

plot(x,uvlnka); %,x,-5*x.*(x-1)+1,'r*')
