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

root/gliderproc/trunk/MATLAB/opnml/FCAST_1.2/matlab_cen/load_mesh.m

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

Initial import of Stark code.

Line 
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% [nn,ne,x,y,z,in,bnd,meshname]=load_mesh(meshname,variable)
3 %% load nod, ele, and bat files
4 %% plot contours of depth (25 to 200 by 25)
5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6 function [nn,ne,x,y,z,in,bnd,meshname]=load_mesh(meshname,variable)
7 [in,x,y,z,bnd]=loadgrid(meshname);
8 size(in);
9 ne=ans(1);
10 size(x);
11 nn=ans(1);
12 %
13 % convert coordinates to longitude and latitude
14 %
15 if variable == 'mesh'
16 hel=drawelems(in,x,y);
17    set(hel,'Color','b');
18 else
19    bndo=plotbnd(x,y,bnd);
20    set(bndo,'Color','red')
21    cval=[25:25:200];
22    lcontour2(in,x,y,z,cval);
23 end
24 hold on
25 title(verbatim(meshname));
26
Note: See TracBrowser for help on using the browser.