G = gsp_ring(N); G = gsp_ring(N,k); G = gsp_ring();
N | Number of vertices. (default 64) |
k | Number of neighbors in each direction (default 1) |
G | Graph structure. |
'gsp_ring(N)' initializes a graph structure containing the weighted adjacency matrix (G.W), the number of vertices (G.N), the plotting coordinates (G.coords), and the plotting coordinate limits (G.coord_limits) of a ring graph with N vertices. Each vertex in the ring has \(2k\) neighbors (maximum value of \(k\) is \(N/2\)). The edge weights are all equal to 1.
Example:
G = gsp_ring(64); param.show_edges = 1; gsp_plot_graph(G,param);