I have a network with edges and points. The FID
shows the ID number of each edge that is created by Start_Point
and End_Point
. For example edge 3
is between the two points of 2
and 3
in the network.
FID Start_Point End_Point
1 1 2
2 1 4
3 2 3
4 2 4
I want to create a 4-by-4 matrix of these points. if there is an edge between 2 points the value is 1
else is inf
:
[inf, 1, inf, 1;
1, inf, 1, 1;
inf, 1, inf, inf;
1, 1, inf, inf]
How can I create such a matrix in MATLAB?
inf
and why it would be1
. What format (data type) is your input in? Please EDIT your question to add these details(inf 1 inf inf inf ... 1)
? What are the round brackets supposed to mean??()
)