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

root/gliderproc/trunk/MATLAB/opnml/FCAST_1.2/vertavg.m

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

Initial import of Stark code.

Line 
1 function favg=vertavg(s,z)
2
3 % FAVG=vertavg(S,Z)
4 %
5 % Vertically averages an s3rx data array
6 %
7 % CVL (2/20/99) copied from W. Gentleman
8
9 nnv=min(size(z));
10 for j=2:nnv
11         fint=fint+(s(:,j)+s(:,j-1)).*(z(:,j)-z(:,j-1))/2;
12 end;
13
14 favg=fint./(z(:,nnv)-z(:,1));
Note: See TracBrowser for help on using the browser.