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

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

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

Initial import of Stark code.

Line 
1 ls *.v2c
2 filename=input('Enter the name of .v2c file: ','s');
3 [v2c,freq]=read_v2c(filename);
4 u=v2c(:,2).*cos(v2c(:,3)*pi/180.0);
5 v=v2c(:,4).*cos(v2c(:,5)*pi/180.0);
6 %
7 %
8 %
9 filehead=blank(filename(1:length(filename)-3));
10 file1=[filehead,'v2r']
11 fid1=fopen(file1,'w');
12 fprintf(fid1,'adrdep2kmg\n');
13 fprintf(fid1,'adrdep2kmg\n');
14 size(u);
15 nn=ans(1);
16 for i=1:nn
17    fprintf(fid1,'%10.0f %14.6e  %14.6e \n',i,u(i),v(i));
18 end
19 fclose(fid1);
Note: See TracBrowser for help on using the browser.