ta=[ 1 1 1 2 2 3 3 4 4 4 5 5 5 5 5 6 6 6 6 6 7 7 7 8 8 9 9 10 11 11 12 12 12 12 13 13 14 14 14 16 16 16 17 17 18 19 21 22 23 23 24]; he=[ 8 19 20 8 10 10 13 15 16 25 12 13 14 17 18 19 21 22 7 20 20 22 24 9 12 11 19 11 12 13 13 14 17 19 14 17 15 16 17 17 24 25 18 23 21 20 22 23 24 25 25]; dl=[40 10 27 22 14 11 4 16 10 28 11 33 24 27 11 20 11 13 25 40 35 8 8 18 42 10 40 5 11 10 21 30 32 36 18 30 10 13 20 10 42 38 12 20 8 38 10 10 11 33 27]; g1=make_graph('graf1',1,25,[ta he],[he ta]); // najkrótsza ścieżka g1=add_edge_data(g1,'length',[dl dl]); //[p,lp]=shortest_path(1,2,g1,'length'); //%n=path_2_nodes(p,g1) ta2=[ 1 1 1 1 2 2 3 3 3 4 4 4 5 5 6]; he2=[ 2 3 5 6 3 5 4 5 7 5 6 7 6 7 7]; dl2=[62 71 57 30 25 41 45 36 72 43 51 58 30 37 21]; g2=make_graph('graf2',1,7,[ta2 he2],[he2 ta2]); g2=add_edge_data(g2,'length',[dl2 dl2]); circ=salesman(g2); wierz=path_2_nodes(circ,g2); g3=make_graph('graf3',0,7,ta2, he2); g3=add_edge_data(g3,'weight',dl2); tr=min_weight_tree(g3);