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

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

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

Initial import of Stark code.

Line 
1 % function [z,sigt,t,s,nn,nnv,mesh,header]=read_s3r3(file)
2 function [z,sigt,t,s,nn,nnv,mesh,header]=read_s3r3(file)
3 [pfid,message]=fopen([file]);
4 datatype=file(length(file)-3:length(file));
5 mesh=fgets(pfid);mesh=blank(mesh(1:length(mesh)-1));
6 header=fgets(pfid);
7 nnv=fscanf(pfid,'%f',1);
8 data=fscanf(pfid,'%f',[1 inf])';
9 fclose(pfid);
10 size(data);
11 nn=ans(1)/nnv/5;
12 string=[num2str(nn),'x',num2str(nnv),' ',datatype,' values read from ',file];
13 fprintf(1,string); fprintf(1,'\n');
14 data=reshape(data,[5 nn*nnv])';
15 z=data(:,2);sigt=data(:,3);t=data(:,4);s=data(:,5);
Note: See TracBrowser for help on using the browser.