="comment">% The Prufer code is a way to map bijectively trees on n vertices</span>
0007 <span class="comment">% into n-2 long sequences of integers drawn from [n].</span>
0008 
0009 <span class="keyword">if</span> nargin==1
0010     n = <a href="nv.html" class="code" title="function n = nv(g)">nv</a>(g);
0011     m = <a href="ne.html" class="code" title="function m = ne(g,h)">ne</a>(g);
0012     <span class="keyword">if</span> (m ~= n-1)
0013         error(<span class="string">'Input graph is not a tree'</