= spring_energy(xy,g)</a>
0032 
0033 vec = <a href="#_sub2" class="code" title="subfunction evec = spring_energy_vec(xy)">spring_energy_vec</a>(xy);
0034 e = sum(vec.^2);
0035 
0036 <span class="keyword">end</span>
0037 
0038 <a name="_sub2" href="#_subfunctions" class="code">function evec = spring_energy_vec(xy)</a>
0039 <span class="comment">%n = nv(g);</span>
0040 evec = zeros(n,n);
0041 
0042 <span class="keyword">for</span> u=1:n-1
0043     <span class="keyword">for</span> v=u+1:n
0044         d = norm