Average or mean of matrix elements
B = mean2(A)
gpuarrayB = mean2(gpuarrayA)
mean2 supports the generation of efficient, production-quality C/C++ code from MATLAB. To see a complete list of toolbox functions that support code generation, see List of Supported Functions with Usage Notes.
The input image A can be numeric or logical. The output image B is a scalar of class double.
The input image gpuarrayA is a gpuArray whose underlying class is numeric or logical. The output image gpuarrayB is a gpuArray scalar with the underlying class double.