文件名称:cmean
介绍说明--下载内容均来自于网络,请自行研究使用
对于有缺测值的数据取平均
使用:
y=cmean(x,k,c)
x为包括有nan的数据,仪器观测中经常会出现
k为对x取第几维方向的平均
c的值可以控制缺测的条件,例如c取50,表示这一维方向上,如果有值的观测超过50个值才取平均,否则取nan;如果c取-5,表示缺测数在5以下时才做平均,否则返回nan-calculate the statistical mean of data but tick off nan
Usage
y=cmean(x,|k) or y=cmean(x,k,|c), k can be []
when [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 bo be nan or mean, c =0 by default(namely, not work)
if c>0, if valuable numbers(notnan) < c, then output nan instead of mean
if c<0, if nan numbers >= c, then output nan instead of mean
使用:
y=cmean(x,k,c)
x为包括有nan的数据,仪器观测中经常会出现
k为对x取第几维方向的平均
c的值可以控制缺测的条件,例如c取50,表示这一维方向上,如果有值的观测超过50个值才取平均,否则取nan;如果c取-5,表示缺测数在5以下时才做平均,否则返回nan-calculate the statistical mean of data but tick off nan
Usage
y=cmean(x,|k) or y=cmean(x,k,|c), k can be []
when [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 bo be nan or mean, c =0 by default(namely, not work)
if c>0, if valuable numbers(notnan) < c, then output nan instead of mean
if c<0, if nan numbers >= c, then output nan instead of mean
(系统自动生成,下载前可以参看下载内容)
下载文件列表
cmean.m