NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

root/gliderproc/trunk/MATLAB/opnml/mat4/plotbnd4.m

Revision 495 (checked in by cbc, 12 years ago)

Initial import of Stark code.

Line 
1 function retval=plotbnd4(x,y,bnd)
2 %PLOTBND4 plot boundary of FEM mesh
3 %   PLOTBND4 is be used to draw the boundary of an existing
4 %   FEM domain.
5 %
6 %   PLOTBND4 can also be used to draw the boundary of a transect.
7 %   The boundary list can be generated by passing DETBNDY
8 %   the transect node coordinates and the element list for
9 %   the transect.  Then, pass PLOTBND4 the same node coordinates
10 %   and the boundary list returned from DETBNDY.
11
12 %  Input :  x   - x-coordinate list
13 %           y   - y-coordinate list
14 %           bnd - boundary node pairs as output from DETBNDY
15 %
16 % Output :  hboun - handle to boundary object drawn
17 %
18 % Call as:  hboun=plotbnd4(x,y,bnd)
19 %
20 % Written by : Brian O. Blanton
21 %
22
23 ns=bnd(:,1);
24 ne=bnd(:,2);
25 X=[x(ns) x(ne) NaN*ones(size(ns))]';
26 Y=[y(ns) y(ne) NaN*ones(size(ns))]';
27 X=X(:);
28 Y=Y(:);
29 hboun=line(X,Y,...
30            'Color','k',...
31            'Linestyle','-',...
32            'LineWidth',2,...
33            'Tag','boundary');
34            
35 if nargout==1,retval=hboun;,end
36 %
37 %        Brian O. Blanton
38 %        Curr. in Marine Science
39 %        15-1A Venable Hall
40 %        CB# 3300
41 %        Uni. of North Carolina
42 %        Chapel Hill, NC
43 %                 27599-3300
44 %
45 %        919-962-4466
46 %        blanton@marine.unc.edu
47 %
Note: See TracBrowser for help on using the browser.