The following Matlab project contains the source code and Matlab examples used for axy2ve.
AXY2VE Convert Graph of Adjacency Matrix and XY Points to Vertices and Edges
Inputs:
A is a NxN adjacency matrix, where A(I,J) is nonzero
if and only if an edge connects point I to point J
xy is a Nx2 (or Nx3) matrix of x,y,(z) coordinates (equivalent to V)
Outputs:
V is a Nx2 (or Nx3) matrix of x,y,(z) coordinates
E is a Px2 matrix containing a list of edge connections
Example:
n = 10;
xy = 10*rand(n,2)
A = round(rand(n))
spy(A);
[V,E] = axy2ve(A,xy)
Example:
n = 2e4;
xy = 10*rand(n,2);
A = sparse(n,n);
IJ = ceil(n*n*rand(n,1));
A(IJ) = 1;
spy(A);
[V,E] = axy2ve(A,xy);
See also: VE2AXY.

The source code and files included in this project are listed in the project files section, please make sure whether the listed source code meet your needs there.

## Project Files:

File Name | Size |
---|---|

axy2ve.m | 1498 |

license.txt | 1311 |