www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/MeanOf8BitIntegerArrayExample.m

    %% Mean of Single-Precision Array
% Create a single-precision vector of ones and compute its single-precision mean.
A = single(ones(10,1));
M = mean(A,'native')
%%
% The result is also in single precision.
class(M)