y0 = <a href="getxy.html" class="code" title="function z = getxy(g)">getxy</a>(g);
0014 <span class="keyword">else</span>
0015     xy0 = 5*randn(n,2);
0016 <span class="keyword">end</span>
0017 
0018 <span class="comment">% opts = optimset('TolX',0.1, 'MaxIter', 50*n,'Display', 'off');</span>
0019 opts = optimset(<span class="string">'MaxIter'</span>, 10*n,<span class="string">'Display'</span>, <span class="string">'final'</span>);
0020 
0021 <span class="comment">%[xy,e]= fminsearch(@spring_energy, xy0, op