Finding a mean for all my data
古いコメントを表示
Hi, How do I find the mean of all the data given in rows and columns.
1 件のコメント
Rena Berman
2023 年 11 月 27 日
(Answers Dev) Restored edit
回答 (2 件)
madhan ravi
2018 年 11 月 28 日
mean(datas)
mean(datas,2)
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(:))
カテゴリ
ヘルプ センター および File Exchange で Numbers and Precision についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!