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

root/gliderproc/trunk/MATLAB/opnml/FCAST_1.2/matlab_cen/s2c2s2r.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 gridname=blank(gridname(1:length(gridname)-1));
5 amp=s2c(:,2);
6 pha=s2c(:,3);
7 %
8 %
9 %
10 filehead=blank(filename(1:length(filename)-3));
11 file1=[filehead,'amp.s2r']
12 fid1=fopen(file1,'w');
13 fprintf(fid1,'adrdep2kmg\n');
14 fprintf(fid1,'adrdep2kmg\n');
15 size(amp);
16 nn=ans(1);
17 for i=1:nn
18    fprintf(fid1,'%10.0f %14.6e  \n',i,100.0*amp(i));
19 end
20 fclose(fid1);
21 %
22 %
23 %
24 filehead=blank(filename(1:length(filename)-3));
25 file1=[filehead,'pha.s2r']
26 fid1=fopen(file1,'w');
27 fprintf(fid1,'adrdep2kmg\n');
28 fprintf(fid1,'adrdep2kmg\n');
29 size(pha);
30 nn=ans(1);
31 for i=1:nn
32    fprintf(fid1,'%10.0f %14.6e  \n',i,pha(i));
33 end
34 fclose(fid1);
Note: See TracBrowser for help on using the browser.