
n=2
T_20=RT_sum_INDIES(:,2)
N=8
B=0.23*48000
odch_20_sum_INDIES=0.88*1000*T_20*((1+(1.9/n))/(N*B.*T_20)).^(1/2)
odch_20_sum_INDIES=odch_20_sum_INDIES(:,2)


n=2
T_30=RT_sum_INDIES(:,3)
N=8
B=0.23*48000
odch_30_sum_INDIES=0.55*1000*T_30*((1+(1.52/n))/(N*B.*T_30)).^(1/2)
odch_30_sum_INDIES=odch_30_sum_INDIES(:,3)


n=10
T_20=RT_impulse_INDIES(:,2)
N=8
B=0.23*48000
odch_20_impulse_INDIES=0.88*1000*T_20*((1+(1.9/n))/(N*B.*T_20)).^(1/2)
odch_20_impulse_INDIES=odch_20_impulse_INDIES(:,4)

n=10
T_30=RT_impulse_INDIES(:,3)
N=8
B=0.23*48000
odch_30_impulse_INDIES=0.55*1000*T_30*((1+(1.52/n))/(N*B.*T_30)).^(1/2)
odch_30_impulse_INDIES=odch_30_impulse_INDIES(:,4)


%% SPOJNICOVY GRAF
figure(4)
plot(RT_sum_INDIES(:,1),odch_20_sum_INDIES(:,1),'b--o','MarkerSize',3,'MarkerFaceColor','b', 'LineWidth', 0.5)
hold on
plot(RT_sum_INDIES(:,1),odch_30_sum_INDIES(:,1),'r--s','MarkerSize',3,'MarkerFaceColor','r', 'LineWidth', 0.5)
hold on
plot(RT_impulse_INDIES(:,1),odch_20_impulse_INDIES(:,1),'b-o','MarkerSize',3,'MarkerFaceColor','b', 'LineWidth', 0.5)
hold on
plot(RT_impulse_INDIES(:,1),odch_30_impulse_INDIES(:,1),'r-s','MarkerSize',3,'MarkerFaceColor','r', 'LineWidth', 0.5)

grid on
xlabel('f_c(Hz)', 'FontSize', 13);
ylabel('\sigma (ms)', 'FontSize', 13);
%set(gca,'XTick',RT_impulse_INDIES(7:24,1));
set(gca, 'XScale', 'log')
xlim([99 5001])
ylim([0 5])
legend('\sigma(RT_{20}) - sumova metoda', '\sigma(RT_{30}) - sumova metoda', '\sigma(RT_{20}) - impulsova metoda', '\sigma(RT_{30}) - impulsova metoda','Location', 'Northeast');

matlab2tikz('nejistoty_mereni_indies.tikz','height', '\figureheight', 'width', '\figurewidth');