Largest Component
Version 1.4.0.0 (1.22 KB) by
Puck Rombach
Takes an adj. matrix of a network and outputs a list of the nodes in its largest connected component
B=largestcomponent(A)
This function find the largest connected component of a networks.
Input A is the adjacency matrix of the network.
Output B is a list of the nodes that are in the largest component.
A(B,B) will give the adj. matrix of the largest component.
Cite As
Puck Rombach (2024). Largest Component (https://www.mathworks.com/matlabcentral/fileexchange/30926-largest-component), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2009b
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Graph and Network Algorithms in Help Center and MATLAB Answers
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.