calculate_overall_connectivity.m 660 Bytes
Newer Older
Raghvendra Mall's avatar
Raghvendra Mall committed
1 2 3 4 5 6 7 8 9 10 11 12 13
function Conn = calculate_overall_connectivity(connectivity_clusters_per_level,cluster_size_per_level,noh)

if (noh>1)
    Conn = zeros(noh,2);
    for i=1:noh
        Conn(i,1) = max(cluster_size_per_level{i}(:,1));
        Conn(i,2) = sum(cluster_size_per_level{i}(:,2).*connectivity_clusters_per_level{i}(:,2))/sum(cluster_size_per_level{i}(:,2));
        %Conn(i,2) = mean(connectivity_clusters_per_level{i}(:,2));
    end
else
    Conn = [max(cluster_size_per_level{1}(:,1)) sum(cluster_size_per_level{1}(:,2).*connectivity_clusters_per_level{1}(:,2))/sum(cluster_size_per_level{1}(:,2))];
end
clear connectivity_clusters_per_level cluster_size_per_level