% maximalny pocet spojeni pri simulacii
max_conn = 21;

% percentualny pocet spravne zameranych simulacii pre dany pocet spojeni
sim1 = [ 0 0  0 29 42 64 72 76 82  93  100 100 100 100 100 100 100 100 100 100 100 ];
sim2 = [ 0 0 23 46 54 72 88 96 100 100 100 100 100 100 100 100 100 100 100 100 100 ];
sim3 = [ 0 0 16 42 49 69 85 91  98 100 100 100 100 100 100 100 100 100 100 100 100 ];

% priemerny pocet potrebnych clusterov na simulacne prostredie
%clusters1 = [ 10 10 7.60 6.110 5.158 4.357 4.273 4.240 4.223 4 4 4 4 4 4 4 4 4 4 4 4 ];  
clusters1 = [ 10 10 7.60 6.110 5.158 4.714 4.473 4.240 4.223 4 4 4 4 4 4 4 4 4 4 4 4 ];  
clusters2 = [ 10 10 6.15 5.115 4.625 4.319 4.176 4.097 4 4 4 4 4 4 4 4 4 4 4 4 4 ];
clusters3 = [ 10 10 6.00 5.633 4.892 4.521 4.259 4.121 4.056 4 4 4 4 4 4 4 4 4 4 4 4 ];

figure(1);
plot( 1:1:max_conn, sim1, 'blue');
hold on;
plot( 1:1:max_conn, sim2, 'red');
hold on;
plot( 1:1:max_conn, sim3, 'green');

xlim([0 22]);
handle = title('Percentualny podiel spravne vypocitanych zhlukov na zaklade poctu spojeni');
set(handle, 'FontName', 'Times New Roman CE');
handle = xlabel('Pocet nahodnych spojeni pre kazdy uzol');
set(handle, 'FontName', 'Times New Roman CE');
handle = ylabel('Podiel spravne ukoncenych simulacii [%]');
set(handle, 'FontName', 'Times New Roman CE');
handle = legend('rozlozenie uzlov podla obr. 3.18','rozlozenie uzlov podla obr. 3.19', 'rozlozenie uzlov podla obr. 3.20' );
set(handle, 'FontName', 'Times New Roman CE');

figure(2);
plot( 1:1:max_conn, clusters1, 'blue');
hold on;
plot( 1:1:max_conn, clusters2, 'red');
hold on;
plot( 1:1:max_conn, clusters3, 'green');
ylim([0 10]);
xlim([0 22]);
handle = title('Zavislost vypocitanych zhlukov na pocte spojeni pre kazdy uzol');
set(handle, 'FontName', 'Times New Roman CE');
handle = xlabel('Pocet nahodnych spojeni pre kazdy uzol');
set(handle, 'FontName', 'Times New Roman CE');
handle = ylabel('Pocet vytvorenych klusterov');
set(handle, 'FontName', 'Times New Roman CE');
handle = legend('rozlozenie uzlov podla obr. 3.18','rozlozenie uzlov podla obr. 3.19', 'rozlozenie uzlov podla obr. 3.20' );
set(handle, 'FontName', 'Times New Roman CE');