Finding a mean for all my data
1 回表示 (過去 30 日間)
古いコメントを表示
Hi, How do I find the mean of all the data given in rows and columns.
回答 (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(:))
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Testing Frameworks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!