title: Generating random weighted adjacency matrix in MATLAB
body: <p>I would like to create a random adjacency matrix in MATLAB such that the total sum of weight is equal to the number of edges. Finally find the Laplacian matrix using</p>
  
  <pre><code>L = diag(sum(A)) - A
  </code></pre>
  
  <p>and then graph it. Is there any way to do so?
  Thanks in advance.</p>