w);

<span class="comment">% Metropolis-Hastings weights</span>
mh_degs = abs(A)'*diag(degs);
w = 1./max(mh_degs,[],2);

<span class="comment">% compute the norm</span>
<span class="keyword">if</span> nargout &gt; 1,
    rho = norm( eye(n) - A*diag(w)*A' - (1/n)*ones(n) );
<span class="keyword">end</span>
</pre>
</div>
</body>
</html>