nd_nearest_pt(xselect(i,1),xselect(i,2),Mobj);
0071 <span class="keyword">end</span>;
0072 
0073 <span class="comment">% replot domain with snapped vertices</span>
0074 plot(x(ipt),y(ipt),<span class="string">'ro'</span>);
0075 <span class="comment">% find nodes closes to straight lines between selected points</span>
0076 transect.x=[];
0077 transect.y=[];
0078 transect.idx=[];
0079 <span class="keyword">for</span> i=1:npts-1
0080     dI=1;
0081     keepgoing=1;
0082     <span class="keyword">while</span> k