function conn=averageconnectivity(md)
%AVERAGECONNECTIVITY - computes the average connectivity of a model
%
%   Usage:
%      connectivity=averageconnectivity(md);

nnz=0;
for i=1:md.numberofgrids,
	nnz=nnz+length(find(md.elements==i));
end
conn=nnz/md.numberofgrids;
