matlab中var函数的翻译For N-D arrays, VAR operates along the first
For N-D arrays, VAR operates along the first non-singleton dimension of X.
VAR normalizes Y by N-1 if N>1, where N is the sample size. This is an unbiased estimator of the variance of the population from which X is drawn, as long as X consists of independent,identically distributed samples. For N=1, Y is normalized by N.
Y = VAR(X,1) normalizes by N and produces the second moment of the sample about its mean. VAR(X,0) is the same as VAR(X).
Y = VAR(X,W) computes the variance using the weight vector W. The length of W must equal the length of the dimension over which VAR operates, and its elements must be nonnegative. VAR normalizes W to sum to one.
Y = VAR(X,W,DIM) takes the variance along the dimension DIM of X. Pass in 0 for W to use the default normalization by N-1, or 1 to use N.