inc2adj(mInc)
Returns a sparse adjacency matrix 'mAdj' according to the incidence matrix 'mInc'. The rows in the incidence matrix must represent the edges, while the columns the vertices.
Function can handle directed graphs with incidence matrix containing -1s, indicating an "in-going" edge, and 1s indicating an "out-going" edge.
Cite As
Ondrej (2026). inc2adj(mInc) (https://nl.mathworks.com/matlabcentral/fileexchange/30862-inc2adj-minc), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.6.0.0 | checks for correct input added (Thanks to Kaif Agbaje) |
||
| 1.5.0.0 | input consistency check modified |
||
| 1.4.0.0 | handled case when the input matrix is zero |
||
| 1.3.0.0 | Major code optimization (Thanks to Andreas Gunnel for inspiration) |
||
| 1.1.0.0 | faster check of the input matrix |
||
| 1.0.0.0 |
