CELLMEAN Mean value of each element a cell array, possibly weighted. M=CELLMEAN(X) where X is a cell array of N arrays, is equivalent to M(1,1)=MEAN(X{1}(:)), M(2,1)=MEAN(X{2}(:)), ..., M(N,1)=MEAN(X{N}(:)) thus returning an N x 1 array containing the mean of all values in each element in the cell array. In taking the mean, non-finite values are ignored, as in VMEAN. M is a column vector of the same length as X. [M1,M2,...,MP]=CELLMEAN(X1,X2,...,XP) also works for P different input arguments. CELLMEAN(X1,X2,...XP); with no output arguments overwrites the original input variables. __________________________________________________________________ Weighted means CELLMEAN(X,'weight',W) or CELLMEAN(X1,X2,...,XP,'weight',W) where W is a cell array of the same size as the other input variables, computes the weighted mean, using the weighting factor ABS(W).^2. __________________________________________________________________ Parallelization CELLMEAN(...,'parallel') parallelizes the computation using a PARFOR loop. This requires that Matlab's Parallel Computing Toolbox be installed, and is useful for very large datasets. __________________________________________________________________ See also CELLSTD, CELLMED, JCELL. Usage: m=cellmean(x); [m1,m2,m3]=cellmean(x1,x2,x3); cellmean(x1,x2,x3,'weight',w); cellmean(x1,x2,x3); cellmean(x1,x2,x3,'parallel'); __________________________________________________________________ This is part of JLAB --- type 'help jlab' for more information (C) 2014--2019 J.M. Lilly --- type 'help jlab_license' for details