s routine is very slow. distxy(g) does a good job and is faster.</span>
0005 <span class="comment">%</span>
0006 <span class="comment">% REQUIRE THE OPTIMIZATION TOOLBOX</span>
0007 
0008 tic;
0009 n = <a href="nv.html" class="code" title="function n = nv(g)">nv</a>(g);
0010 con = <a href="isconnected.html" class="code" title="function yn = isconnected(g)">isconnected</a>(g);
0011 
0012 <span class="keyword">if</span> (<a href="hasxy.html" class="code" title="function yn = hasxy(g)">hasxy</a>(g))
0013     x