Is this possible?
1 view (last 30 days)
Show older comments
I wanted to make sure that this was possible to do in MATLAB and possibly how I would do it.
I have an array of 100 random binary, undirected matrices that I've calculated. I need to find the average overlap between these matrices. I know how to do this conceptually but not in code: add two matrices, where there is a 2, there is an overlap, do this for all comparisons and average.
However, I have no idea how to do this in code or if it's even possible.
0 Comments
Accepted Answer
Walter Roberson
on 4 May 2012
overlaps = a & b;
average_overlap = mean(overlaps(:)); %under one definition
4 Comments
Walter Roberson
on 5 May 2012
for J = 1 : length(TheNetworksCellArray)
overlaps = TheNetworksCellArray{J} & ExperimentalMatrix;
average_overlap(K) = mean(overlaps(:));
end
More Answers (1)
See Also
Categories
Find more on Line Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!