/[MITgcm]/MITgcm_contrib/enderton/Diagnostics/DiagUtility/meanovernan.m
ViewVC logotype

Annotation of /MITgcm_contrib/enderton/Diagnostics/DiagUtility/meanovernan.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Mon Jan 31 15:43:28 2005 UTC (20 years, 5 months ago) by enderton
Branch: MAIN
CVS Tags: HEAD
 o Initial check in.

1 enderton 1.1 function y = meanovernan(x,dim)
2    
3     xsize = size(x);
4     xflat = reshape(x,[prod(xsize),1]);
5     nanindex = isnan(xflat);
6     xflat(nanindex) = 0;
7     nanindex = reshape(~nanindex,xsize);
8     xtemp = reshape(xflat,xsize);
9     warning off MATLAB:divideByZero
10     y = sum(xtemp,dim)./sum(nanindex,dim);
11     warning on MATLAB:divideByZero

  ViewVC Help
Powered by ViewVC 1.1.22