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

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

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

Initial import of Stark code.

Line 
1 ls *.s2c
2 filename=input('Enter the name of .s2c file: ','s');
3 [s2c,freq,gridname]=read_v2r(filename);
4 amp=s2c(:,2);
5 pha=s2c(:,3);
6 gridname=blank(gridname(1:length(gridname)-1));
7 [in,x,y,z,bnd]=loadgrid(gridname);
8 %
9 % Plot boundary
10 %
11 % figure('Position',[500 500 300 300])
12 figure
13 whitebg('w')
14 hold on
15 bndo=plotbnd(x,y,bnd);
16 set(bndo,'Color','k')
17 axis('equal')
18 % cval=[50 100 200];
19 % hc=lcontour2(ele,x,y,z,cval);
20 % set(hc,'Color','k')
21 %
22 % Amplitude contours
23 %
24 title([filename])
25 scalar=amp;
26 scrange(scalar)
27 cint=input('Enter the contour interval: ');
28 if cint > 0
29 cmin=cint*floor(min(scalar)/cint)
30 cmax=cint*ceil(max(scalar)/cint)
31 clear cval
32 i=1
33 cval(i)=cmin;
34 while cval(i) < cmax
35    i=i+1;
36    cval(i)=cval(i-1)+cint;
37 end
38 cval
39 h=lcontour2(in,x,y,scalar,cval);
40 end
41 %
42 % Phase contours
43 %
44 scalar=pha;
45 scrange(scalar)
46 cint=input('Enter the contour interval: ');
47 if cint > 0
48 cmin=cint*floor(min(scalar)/cint)
49 cmax=cint*floor(max(scalar)/cint)
50 clear cval
51 i=1
52 cval(i)=cmin;
53 while cval(i) < cmax
54    i=i+1;
55    cval(i)=cval(i-1)+cint;
56 end
57 cval
58 h=isophase(in,x,y,scalar,cval);
59 end
60 zoom on
Note: See TracBrowser for help on using the browser.