function mkpPriklad()

k1 = 1; k2 = 5;
f = 1;
u0 = -2; DirUzly = 1; g = 0;

condA = [];
h = [];

for n = 3:2:21
    m = n-1;
    h = [h,1/m];
    uzly = linspace(0,1,n);
    prvky = [1:(n-1);2:n];
    k = [k1*ones(1,floor(n/2)),k2*ones(1,m-floor(n/2))];
    f = ones(1,m);
    [A,b] = mkp(uzly,prvky,k,f,DirUzly,u0,n,g);
    condA = [condA,cond(full(A))];
    uH = A\b; u = [u0;uH];
    hold on; plot(uzly,u)
    pause
end

hold off; plot(log(h),log(condA),'r',log(h),log(1./(h.^2)),'b')