function []=my_graph_connections2(connectionsfound) %creates graph of connections networksize=length(connectionsfound); sqrtnetworksize=sqrt(networksize); clf; colorscaling=max(max(imag(connectionsfound)))-min(min(imag(connectionsfound)))+.001; thresh=300; for i=1:networksize for j=1:networksize if (real(connectionsfound(i,j))>thresh) lnwidth=real(connectionsfound(i,j))/max(max(real(connectionsfound)))*10; lncolor=[(imag(connectionsfound(i,j))-min(min(imag(connectionsfound))))/colorscaling 0 0]; line([mod(i,sqrtnetworksize) mod(j,sqrtnetworksize)]', [(floor((i-1)/sqrtnetworksize)+1) (floor((j-1)/sqrtnetworksize)+1)]', 'linewidth', lnwidth, 'color', lncolor) end end end axis([0 sqrtnetworksize-1 1 sqrtnetworksize]); grid on; axis off; title(sprintf('Nodal Connections with Threshhold=%d', thresh),'fontsize',12,'fontweight','bold');