Graph representation - graph2rep (Undirected graphs)
Version 1.0.1 (1.81 KB) by
David Matajira
Graph to adjacency list and adjacency matrix (Undirected graphs)
Graph to adjacency list and adjacency matrix (Undirected graphs):
To externally get the adjacent vertex call the adjacency list per row
Example: nonzeros(adjacency_list(i,:))
Any observations or/and suggestions for improvement of this code send to David Matajira at this email address: david.matajira@icloud.com
Your contribution to improving this code will be acknowledged in revision section in this script and in the MatLab web page of the File Exchange - MATLAB Central - MathWorks
Principal Investigator: Dr. Joel Antonio Trejo Sanchez
Cite As
David Matajira (2026). Graph representation - graph2rep (Undirected graphs) (https://uk.mathworks.com/matlabcentral/fileexchange/118815-graph-representation-graph2rep-undirected-graphs), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2021a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
