I have a vector with x and y position.
If n=3 I have array with length 6. Each cell value is a position on space
A= [x1 y1 ,x2 y2 ,x3 y3]
// As example A = [2 3.122 , 1.3 6, 2.1 5.6]
how can I a complete graph of this positions ?
appreciate any help.
gplot(A,Coordinates)plots a graph of the nodes defined in Coordinates according to the n-by-n adjacency matrix A, where n is the number of nodes. Coordinates is an n-by-2 matrix, where n is the number of nodes and each coordinate pair represents one nodeFor two-dimensional data, Coordinates(i,:) = [x(i) y(i)] denotes node i, and Coordinates(j,:) = [x(j)y(j)] denotes node j. If node i and node j are connected, A(i,j) or A(j,i) is nonzero; otherwise, A(i,j) and A(j,i) are zero.
for more info.
For your example, with the trivial all ones adjacency matrix, you’ll get: