mean: S = mean(X) is the mean value of the elements in X if X is a vector.
For matrices, S is a row vector containing the mean value of each
For matrices, S is a row vector containing the mean value of each
column.
X如果是向量,mean返回X的平均值,X如果是矩阵,mean返回每列的平均值
特别注意:mean(X,1)返回是每列的均值;mean(X,2)返回每行的均值
size:size函数的使用主要用来返回矩阵的行数和列数
D = size(X) 返回行数列数
[M,N] = size(X) M为行数,N为行数
size(X,1) 返回行数
size(X,2) 返回列数