mean2.m

来自「有关matlab的电子书籍有一定的帮助希望有用」· M 代码 · 共 16 行

M
16
字号
function y = mean2(x)
%MEAN2 Compute mean of matrix elements.
%   B = MEAN2(A) computes the mean of the values in A.
%
%   Class Support
%   -------------
%   A is an array of class uint8 or double. B is a scalar of
%   class double.
%
%   See also MEAN, STD, STD2.

%   Copyright 1993-1998 The MathWorks, Inc.  All Rights Reserved.
%   $Revision: 5.7 $  $Date: 1997/11/24 15:35:54 $

y = sum(x(:))/prod(size(x));

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?