フィルターのクリア

Finding a mean for all my data

1 回表示 (過去 30 日間)
Megan Mirkhanian
Megan Mirkhanian 2018 年 11 月 28 日
編集済み: Rena Berman 2023 年 11 月 27 日
Hi, How do I find the mean of all the data given in rows and columns.
  1 件のコメント
Rena Berman
Rena Berman 2023 年 11 月 27 日
(Answers Dev) Restored edit

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

回答 (2 件)

madhan ravi
madhan ravi 2018 年 11 月 28 日
mean(datas)
mean(datas,2)

Star Strider
Star Strider 2018 年 11 月 28 日
If you have a recent MATLAB release (definitely R2018b, possibly earlier), use the 'all' argument:
matrix = rand(5,7)
Avg = mean(matrix, 'all')
otherwise, convert it to a column vector first:
Avg = mean(matrix(:))

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by