function retval=plotbnd4(x,y,bnd) %PLOTBND4 plot boundary of FEM mesh % PLOTBND4 is be used to draw the boundary of an existing % FEM domain. % % PLOTBND4 can also be used to draw the boundary of a transect. % The boundary list can be generated by passing DETBNDY % the transect node coordinates and the element list for % the transect. Then, pass PLOTBND4 the same node coordinates % and the boundary list returned from DETBNDY. % % Input : x - x-coordinate list % y - y-coordinate list % bnd - boundary node pairs as output from DETBNDY % % Output : hboun - handle to boundary object drawn % % Call as: hboun=plotbnd4(x,y,bnd) % % Written by : Brian O. Blanton % ns=bnd(:,1); ne=bnd(:,2); X=[x(ns) x(ne) NaN*ones(size(ns))]'; Y=[y(ns) y(ne) NaN*ones(size(ns))]'; X=X(:); Y=Y(:); hboun=line(X,Y,... 'Color','k',... 'Linestyle','-',... 'LineWidth',2,... 'Tag','boundary'); if nargout==1,retval=hboun;,end % % Brian O. Blanton % Curr. in Marine Science % 15-1A Venable Hall % CB# 3300 % Uni. of North Carolina % Chapel Hill, NC % 27599-3300 % % 919-962-4466 % blanton@marine.unc.edu %