Scilab 6.0.2
Please note that the recommended version of Scilab is 2026.0.0. This page might be outdated.
See the recommended documentation of this function
mean
ベクトル/行列の要素の平均 (行平均, 列平均)
呼び出し手順
y=mean(x) y=mean(x,'r') y=mean(x,'c') y=mean(x,'m')
パラメータ
- x
実数ベクトルまたは行列
- y
スカラーまたはベクトル
説明
xがベクトルまたは行列の場合, y=mean(x) は,
xの全ての要素の平均をスカラーyに返します.
y=mean(x,'r') (または等価的に, y=mean(x,1))
は行単位の平均です. 行ベクトルを返します: y(j)=
mean(x(:,j))
y=mean(x,'c') (または等価的に,y=mean(x,2))
は列単位の平均ですn. 列ベクトルを返します: y(i)=
mean(x(i,:))
y=mean(x,'m') は,
xの最初の1でない次元に沿った平均です(Matlabとの互換用).
![]() | mean() can be overloaded. |
例
A=[1,2,10;7,7.1,7.01]; mean(A) mean(A,'r') mean(A,'c') A=matrix(1:12,[1,1,2,3,2]); // この場合, mean(A,'m') は mean(A,3)と等価です (Aの最初の1でない次元は3) y=mean(A,'m')
参照
履歴
| バージョン | 記述 |
| 6.0.1 | mean() is now overloadable. |
| Report an issue | ||
| << harmean | Central Tendency | meanf >> |
