Description: calculate the statistical sum of data but tick off nan
Usage:
y=csum(x,|k) or y=csum(x,k,|c), k can be []
[m,n,...]=size(x)
if k==1, [1,n,...]=size(y)
if not set k, then k=1, but if m==1, k=k+1,>>...
if k==2, [m,1,...]=size(y)
if k>2, [m,n,...,1(k demension),...]=size(y).
you can squeeze(y) by yourself to remove the dim(whose size(y,dim)==1)
c can control output to be nan ro sum, c = 0 by default(namely, not work)
if c>0, if valuable numbers(notnan) < c, then output nan instead of sum
if c<0, if nan numbers >= c, then output nan instead of sum
To Search:
File list (Check if you may need any files):
csum.m