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

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

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

Initial import of Stark code.

Line 
1 %
2 % Notify user if this script file cannot be used with their version of matlab
3 %
4 thisversion=version;
5 if thisversion(1) == '5'
6    fprintf(1,'\n\nSORRY: This matlab script file fails for more recent releases of matlab than Version 4.2c  \n\n')
7    fprintf(1,'You are currently using matlab version: %c%c%c%c%c%c%c%c%c%c%c',version)
8    fprintf(1,'\n\n')
9    break
10 end
11 %
12 % Load data from files
13 %
14 newplot='y';
15 while newplot == 'y',
16    ls *.v2c
17    filename=input('Enter the name of .v2c file: ','s');
18    [v2c,freq]=read_v2c(filename);
19    gridname=input('Enter the name of grid: ','s');
20    [in,x,y,z,bnd]=loadgrid(gridname);
21 %
22 % Plot boundary
23 %
24    figure
25    whitebg('k')
26    hold on
27    bndo=plotbnd(x,y,bnd);
28    set(bndo,'Color','k')
29    axis('equal')
30 %   cval=[50 100 200];
31 %   hc=lcontour2(ele,x,y,z,cval);
32 %   set(hc,'Color','k')
33 %
34 % Plot tidal ellipses
35 %
36 %   newscale='y'
37 %   while newscale == 'y',
38       scale=input('Enter the desired tidal ellipse scale: ');
39       per=2.0*pi/freq/3600.0;
40       htel=tellipse(x,y,scale*v2c(:,2),v2c(:,3),scale*v2c(:,4),v2c(:,5),per);
41       title([filename])
42       zoom on
43 %      newscale=input('New scale? (y/n): ','s');
44 %      if newscale == 'y',
45 %         delete(htel)
46 %      end
47 %   end
48    newplot=input('New plot? (y/n): ','s');
49 end
Note: See TracBrowser for help on using the browser.