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

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

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

Initial import of Stark code.

Line 
1 % function [zl,datal,nn,nl,mesh,header]=read_lst(file)
2 % zl(1,nl)
3 % datal(nn,nl)
4 function [zl,datal,nn,nl,mesh,header]=read_lst(file)
5 %
6 if nargin == 0
7    file=input('Enter the name of the .lst file: ','s');
8 end
9 %
10 [pfid,message]=fopen([file]);
11 datatype=file(length(file)-2:length(file));
12 mesh=fgets(pfid);mesh=blank(mesh(1:length(mesh)-1));
13 header=fgets(pfid);
14 nl=fscanf(pfid,'%d1');
15 zl=fscanf(pfid,'%f',[nl 1])';
16 datal=fscanf(pfid,'%f',[1 inf])';
17 size(datal);
18 nn=ans(1)/nl;
19 string=[num2str(nn),'x',num2str(nl),' level surface ',datatype,' values read from ',file];
20 fprintf(1,string); fprintf(1,'\n');
21 datal=reshape(datal,nl,nn)';
Note: See TracBrowser for help on using the browser.