function porovnaniAproximaci()

% % nase uplne prvni funkce
% f = @(x) (sin((pi/2)*x)); a = -1; b = 1;
% m = 20;
% uzly = linspace(a,b,m+1);
% for n=1:20
%     PolynomialniRegrese(f,uzly,n);
%     log = sprintf('f(x) = sin((pi/2)*x), a = -1, b = 1, m = %d, n = %d',m,n);
%     title(log)
%     pause;
%     clf
% end

% Rungeho funkce
f = @(x) (1./(1+x.^2)); a = -5; b = 5;
m = 50;
uzly = linspace(a,b,m+1);
for n=1:50
    PolynomialniRegrese(f,uzly,n);
    log = sprintf('f(x) = 1/(1+x^2), a = -5, b = 5, m = %d, n = %d',m,n);
    title(log)
    pause;
    clf
end
