Parent Directory
|
Revision Log
|
Revision Graph
o Initial check in.
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 |