I have the graph below. It was plotted using the code below:
%% matrix (:,4) is the weight of the corresponding matrix(:1:2) branches. Ignore matrix(:,3).
nodes = []; for i = 1:1:size(matrix,1) if matrix(i,4) <= 10000 nodes = [nodes,matrix(i,1:2)]; end end nodes_cellarray{:} = nodes; set(figure, 'Visible', 'on'); Graph = graph(matrix(:,1),matrix(:,2)); plot_array = plot(Graph, 'layout', 'auto');% plot_array.EdgeColor = 'red';
highlight(plot_array,nodes_cellarray{:},'EdgeColor','r','NodeColor','r','LineWidth',4);
I have attached the matrix23.xlsx file that has the matrix 'matrix' used above.
Best Answer