function prikladKonvergenceMKP1d(h)

l = 1;

% nehomogenni material
k1 = 1;
k2 = 10; %k2 = 1;
auu = 241/10560; % auu = 1/12;

idx = 1:6;
h = l./(2.^idx);

for i=idx
    hi = h(i);
    m = ceil(l/hi);
    n = m+1;

    x = 0:hi:l;
    k = k1*ones(1,m);
    k((m/2+1):end) = k2;
    f = ones(1,m);

    ID = [1,n];
    uD = [0,0];
    IN = []; tau = [];

    [A,b] = mkp1d(x,k,f,ID,uD,IN,tau);
    u = A\b;
    
    chyba(i) = sqrt(auu-u'*A*u);
end

plot(h,chyba)
