The function generateRandomConnectedGraph
generates a random undirected connected graph with a user-specified parameter that coarsely controls the graph's sparsity. The function also provides the graph Laplacian matrix. The function can be useful when evaluating algorithms for control and optimization of multi-agent/distributed systems. The script RandomConnectedGraph
contains the function, along with an example.