Hello.
For example, I don't know what is the mean(A,3).
Who's anybody know that? please help me.

 採用された回答

Stephen23
Stephen23 2017 年 4 月 26 日
編集済み: Stephen23 2017 年 4 月 26 日

0 投票

Why not read the MATLAB help? You can do this easily from MATLAB itself:
doc mean
Or by using your favorite internet search engine (it takes just 0.1 seconds).
The MATLAB documentation for mean states that " M = mean(A,dim) returns the mean along dimension dim ".
So your code finds the mean along the third dimension.

その他の回答 (1 件)

KSSV
KSSV 2017 年 4 月 26 日

0 投票

mean(k,3) gives mean of a 3D matrix.
K = rand(2,2,2) ;
mean(K,3)

1 件のコメント

Stephen23
Stephen23 2017 年 4 月 26 日
編集済み: Stephen23 2017 年 4 月 26 日
@KSSV: What is the "mean(k,3) gives mean of a 3D matrix" actually?
Is it the mean of all elements, the mean of some elements, the mean along a particular dimension? Which of those are you trying to explain? (it is one of them, but which one?)

サインインしてコメントする。

カテゴリ

ヘルプ センター および File Exchange で MATLAB についてさらに検索

タグ

質問済み:

2017 年 4 月 26 日

編集済み:

2017 年 4 月 26 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!